<template>
    <div class="app-container">
     <div>
      <div class="dfdsfsd" :class={sdszxxcx:yttw}>
  
     <div>
      <el-form
        :model="queryParams"
        ref="queryForm"
        size="small"
        :inline="true"
        v-show="showSearch"
      >
        <!-- <el-form-item label="权限字符" prop="roleKey">
          <el-input
            v-model="queryParams.roleKey"
            placeholder="请输入权限字符"
            clearable
            style="width: 240px"
            @keyup.enter.native="handleQuery"
          />
        </el-form-item> -->
  
        <el-form-item label="关键词">
          <el-input
            v-model="queryParams.keyword"
            placeholder=""
            clearable
            style="width: 240px"
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="学生退款">
          <el-select
            v-model="queryParams.customerRefundState"
            placeholder=""
            clearable
            style="width: 240px"
          >
            <el-option
              v-for="dict in [
                { value: 0, label: '未退款' },
                { value: 1, label: '已退款' },
              ]"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
  
        <el-form-item label="是否挂科">
          <el-select
            v-model="queryParams.customerFailExam"
            placeholder=""
            clearable
            style="width: 240px"
          >
            <el-option
              v-for="dict in [
                 { value: '1', label: '是' },
                  { value: '0', label: '否' },
              ]"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="老师退款">
          <el-select
            v-model="queryParams.teacherRefundState"
            placeholder=""
            clearable
            style="width: 240px"
          >
            <el-option
              v-for="dict in [
                { value: 0, label: '未退款' },
                { value: 1, label: '已退款' },
              ]"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
  
        <el-form-item label="订单状态">
          <el-select
            v-model="queryParams.orderStatus"
            placeholder=""
            clearable
            style="width: 240px"
          >
            <el-option
              v-for="dict in [
                { value: 0, label: '未完结' },
                { value: 1, label: '已完结' },
              ]"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
  
        <el-form-item label="客诉状态">
          <el-select
            v-model="queryParams.complaintStatus"
            placeholder=""
            clearable
            style="width: 240px"
          >
            <el-option
              v-for="dict in [
                { value: 0, label: '无客诉' },
                { value: 1, label: '客诉处理中' },
                { value: 2, label: '已完结' },
              ]"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
  
        <el-form-item label="重要订单">
          <el-select
            v-model="queryParams.importantOrder"
            placeholder=""
            clearable
            style="width: 240px"
          >
            <el-option
              v-for="dict in [
                { value: 0, label: '成交价金额小于5000' },
                { value: 1, label: '成交价金额大于等于5000' },
              ]"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
  
        <el-form-item label="选档">
          <el-select
            v-model="queryParams.directSelect"
            placeholder=""
            clearable
            style="width: 240px"
          >
            <el-option
              v-for="dict in [
                { value: '低档', label: '低档' },
                { value: '中档', label: '中档' },
                { value: '高档', label: '高档' },
              ]"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="尾款">
          <el-select
            v-model="queryParams.balanceStatus"
            placeholder=""
            clearable
            style="width: 240px"
          >
            <el-option
              v-for="dict in [
                { value: '0', label: '已付尾款' },
                { value: '1', label: '未付尾款' },
              ]"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="国家">
          <el-select
            v-model="queryParams.country"
            placeholder=""
            clearable
            style="width: 240px"
          >
            <el-option
              v-for="dict in scountry"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="老师结款情况">
          <el-select
            v-model="queryParams.settlementStatus"
            placeholder=""
            clearable
            style="width: 240px"
          >
            <el-option
              v-for="dict in [
                { value: '0', label: '未结完' },
                { value: '1', label: '已结完' },
              ]"
              :key="dict.value"
              :label="dict.label"
              :value="dict.value"
            />
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button
            type="primary"
            icon="el-icon-search"
            size="mini"
            @click="handleQuery"
            >搜索</el-button
          >
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
            >重置</el-button
          >
        </el-form-item>
  
        <el-form-item label="">
          <el-radio-group @change="getList" v-model="queryParams.delFlag">
            <el-radio :label="0">未删除</el-radio>
            <el-radio :label="2">已删除</el-radio>
          </el-radio-group>
        </el-form-item>
      </el-form>
     </div>
  
    <div style="height:50px">
      <!-- <el-button
            type="primary"
            size="mini"
            @click='vkhf'
            >{{yttw?'收起':'展开'}}</el-button
          > -->
    </div>
      </div>
     </div>
  
      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5">
          <el-button
            type="primary"
            plain
            icon="el-icon-plus"
            size="mini"
            @click="handleAdd"
           
            >新增</el-button
          >
        </el-col>
        <!-- <el-col :span="1.5">
          <el-button
            type="success"
            plain
            icon="el-icon-edit"
            size="mini"
            :disabled="single"
            @click="handleUpdate"
            
            >修改</el-button
          >
        </el-col> -->
        <el-col :span="1.5">
          <el-button
            type="danger"
            plain
            icon="el-icon-delete"
            size="mini"
            :disabled="multiple"
            @click="handleDelete"
            >删除</el-button
          >
        </el-col>
        <el-col v-if="user == 'admin'" :span="1.5">
          <el-button
            type="warning"
            plain
            icon="el-icon-download"
            size="mini"
            @click="handleExport"
            >导出
          </el-button>
        </el-col>
        <el-col :span="1.5">
          <!-- <div class=" vo"></div>
          sd -->
        </el-col>
  
        <right-toolbar
         
          :showSearch.sync="showSearch"
          @queryTable="getList"
        ></right-toolbar>
      </el-row>
      <!-- :row-style="rowStyle" -->
  
      <el-table
        class="no-hover"
        @sort-change="paixu"
        :row-key="(record) => record.orderId"
        ref="el-table"
        :row-class-name="tableRowClassName"
        :cell-class-name="danyuange"
        :height="tableHeight"
        v-loading="loading"
        :data="roleList"
        border
        :span-method="arraySpanMethod"
        @selection-change="handleSelectionChange"
      >
      <el-table-column
  align="center"
  fixed
  label="退款时间"
  prop="createTime"
  width="120"
  sortable="custom"
  >
  </el-table-column>
        <el-table-column
          align="center"
          fixed
          label="单号"
          prop="orderNumber"
          width="120"
          sortable="custom"
        >
        </el-table-column>
        <el-table-column
          align="center"
          label="询单号"
          prop="followNumber"
          width="120"
          sortable="custom"
        >
        </el-table-column>
        <el-table-column
          align="center"
          label="客户"
          sortable="custom"
          prop="customerNickname"
          :show-overflow-tooltip="true"
          width="150"
        />
        <el-table-column
          label="所在账号"
          align="center"
          sortable="custom"
          prop="account"
          :show-overflow-tooltip="true"
          width="150"
        />
        <el-table-column
          align="center"
          label="任务类型"
          prop="taskType"
          sortable="custom"
          width="100"
        />
        <el-table-column
          align="center"
          label="国家（地区）"
          sortable="custom"
          prop="country"
          width="150"
        />
        <el-table-column
          sortable="custom"
          align="center"
          label="学校"
          prop="school"
          width="100"
        />
  
        <el-table-column
          sortable="custom"
          align="center"
          prop="phase"
          label="阶段"
          width="100"
        />
        <el-table-column
          sortable="custom"
          align="center"
          label="专业/科目/工作量"
          width="200"
        >
          <template slot-scope="scopes">
            <el-table
              :row-class-name="tableRowClassNames(scopes.row)"
              class="no-header-table"
              :row-key="(record) => record.taskId"
              :data="scopes.row.orderTaskList"
              border
              style="width: 100%"
            >
              <el-table-column
                align="center"
                prop="workTask"
                width="200"
                label="年级/专业/科目/工作量"
              >
                <template slot-scope="scope">
                  <el-tooltip class="item" effect="dark" placement="top-start">
                    <div slot="content">
                      <div style="width: 600px">
                        {{ scope.row.workTask }}
                      </div>
                    </div>
                    <div
                      style="
                        width: 180px;
                       
                      "
                    >
                      {{ scope.row.workTask }}
                    </div>
                  </el-tooltip>
                </template>
              </el-table-column>
              <el-table-column
                align="center"
                prop="fraction"
                width="149"
                label="分数占比"
              >
              </el-table-column>
              <el-table-column
                align="center"
                prop="submissionTask"
                width="149"
                label="老师交稿ddl"
              >
              </el-table-column>
  
              <el-table-column
                align="center"
                prop="studentDeadlineTask"
                width="149"
                label="学生要求交稿ddl"
              >
              </el-table-column>
              <el-table-column
                align="center"
                prop="deadlineTask"
                width="150"
                label="实际截止ddl"
              >
              </el-table-column>
              <el-table-column
                align="center"
                prop="submitStatus"
                width="150"
                label="是否交稿"
              >
                <template slot-scope="scope">
                  {{
                    scope.row.submitStatus == "0" || !scope.row.submitStatus
                      ? "否"
                      : "是"
                  }}
                  <el-dropdown
                    size="mini"
                    @command="
                      (command) => handleCommands(command, scope.row, scopes.row)
                    "
                    
                  >
                    <el-button
                      size="mini"
                      type="text"
                      icon="el-icon-d-arrow-right"
                      >操作</el-button
                    >
                    <el-dropdown-menu slot="dropdown">
                      <el-dropdown-item
                        command="delete"
                        icon="el-icon-delete"
                        
                      >
                        删除
                      </el-dropdown-item>
                      <el-dropdown-item
                        v-if="
                          scope.row.submitStatus == '0' || !scope.row.submitStatus
                        "
                        command="jiaogaobianji"
                        icon="el-icon-s-promotion
  "
                        
                        >编辑</el-dropdown-item
                      >
                      <el-dropdown-item
                      v-if="
                          scope.row.submitStatus != '0' && scope.row.submitStatus
                        "
                        command="jiaofankui"
                        icon="el-icon-s-promotion
  "
                        
                        >反馈</el-dropdown-item
                      >
  
                      <el-dropdown-item
                        v-if="
                          scope.row.submitStatus == '0' || !scope.row.submitStatus
                        "
                        command="jiaogaoa"
                        icon="el-icon-s-promotion
  "
                        
                        >交稿</el-dropdown-item
                      >
                    </el-dropdown-menu>
                  </el-dropdown>
                </template>
              </el-table-column>
            </el-table>
  
            <p style="margin-top: 4px; margin-bottom: 0">
              <i
                style="
                  cursor: pointer;
  
                  color: #1890ff;
                "
                class="el-icon-circle-plus-outline"
                @click="chuandi(scopes.row)"
                >新增任务</i
              >
            </p>
          </template>
        </el-table-column>
        <el-table-column
          align="center"
          label="分数占比"
          prop="fraction"
          width="150"
        />
        <el-table-column
          align="center"
          label="老师交稿ddl"
          prop="school"
          width="150"
        />
        <el-table-column
          align="center"
          label="学生要求交稿ddl"
          prop="school"
          width="150"
        />
  
        <el-table-column
          align="center"
          label="实际截止ddl/考试时间"
          prop="school"
          width="150"
        />
        <el-table-column
          align="center"
          label="是否交稿"
          prop="school"
          width="150"
        />
        <el-table-column
          align="center"
          label="选档"
          sortable="custom"
          prop="directSelect"
          width="80"
        />
        <el-table-column
          align="center"
          label="已收款金额"
          prop="amountReceived"
          sortable="custom"
          width="120"
        >
          <template slot-scope="scope">
            {{ (Math.round(scope.row.amountReceived * 100) / 100).toFixed(2) }}
          </template>
        </el-table-column>
  
        <el-table-column
          align="center"
          label="未收款金额"
          sortable="custom"
          width="120"
          prop="outstandingAmount"
        >
          <template slot-scope="scope">
            {{ (Math.round(scope.row.outstandingAmount * 100) / 100).toFixed(2) }}
          </template>
        </el-table-column>
        <el-table-column
          align="center"
          sortable="custom"
          label="学生补价"
          prop="supplementaryValency"
          width="150"
        >
          <template slot-scope="scope">
            <span
              @click="shoukankuangbuujuia(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
            <!-- {{
              (Math.round(scope.row.supplementaryValency * 100) / 100).toFixed(2)
            }} -->
            <br />
            <!-- <el-button type="primary" icon="el-icon-edit" circle></el-button> -->
          </template>
        </el-table-column>
        <el-table-column
          sortable="custom"
          align="center"
          label="保费"
          prop="guarantee"
          width=""
        >
          <template slot-scope="scope">
            {{ (Math.round(scope.row.parcelInsurance * 100) / 100).toFixed(2) }}
          </template>
        </el-table-column>
        <el-table-column
          sortable="custom"
          width="120"
          align="center"
          label="保分/保费"
          prop="guarantee"
        />
  
        <el-table-column
          align="center"
          label="成交价"
          sortable="custom"
          width="120"
          prop="transactionPrice"
        >
          <template slot-scope="scope">
            {{ (Math.round(scope.row.transactionPrice * 100) / 100).toFixed(2) }}
          </template>
        </el-table-column>
  
        <el-table-column
          align="center"
          label="本单应收"
          sortable="custom"
          width="120"
          prop="officialReceipts"
        >
          <template slot-scope="scope">
            {{ (Math.round(scope.row.billReceivable * 100) / 100).toFixed(2) }}
          </template>
        </el-table-column>
        <el-table-column
          align="center"
          label="本单实收"
          prop="officialReceipts"
          sortable="custom"
          width="120"
        >
          <template slot-scope="scope">
            {{ (Math.round(scope.row.officialReceipts * 100) / 100).toFixed(2) }}
          </template>
        </el-table-column>
        <el-table-column
          align="center"
          label="收款情况"
          prop="collectionSituation"
          sortable="custom"
          width="120"
        >
          <template slot-scope="scope">
            <!-- {{ scope.row.collectionSituation }} -->
            <span
              @click="shoukankuang(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
          </template>
        </el-table-column>
        <el-table-column
          align="center"
          sortable="custom"
          width="120"
          label="储值剩余"
          prop="remainingSum"
        >
          <template slot-scope="scope">
            {{ (Math.round(scope.row.remainingSum * 100) / 100).toFixed(2) }}
          </template>
        </el-table-column>
  
        <el-table-column
          align="center"
          label="储值备注"
          sortable="custom"
          width="120"
          prop="remainingSumRemark"
        >
        </el-table-column>
        <el-table-column
          align="center"
          sortable="custom"
          width="120"
          label="成单客服"
          prop="orderService"
        >
        </el-table-column>
  
        <el-table-column
          align="center"
          label="引流销售"
          sortable="custom"
          width="120"
          prop="drainageService"
        >
        </el-table-column>
  
        <el-table-column
          align="center"
          label="客户属性"
          sortable="custom"
          width="120"
          prop="customerAttribute"
        >
          <template slot-scope="scope">
            <span :class="{ hong: !zhengze(scope.row.customerAttribute) }">
              {{ scope.row.customerAttribute }}
            </span>
          </template>
        </el-table-column>
  
        <el-table-column
          align="center"
          label="挂科率"
          prop="failRate"
          sortable="custom"
          width="120"
        >
        </el-table-column>
        <el-table-column
          align="center"
          label="及时率"
          prop="timelinessRatio"
          sortable="custom"
          width="120"
        >
        </el-table-column>
  
        <el-table-column
          sortable="custom"
          width="120"
          align="center"
          label="老师"
          prop="teacherName"
        >
        </el-table-column>
        <el-table-column
          sortable="custom"
          width="120"
          align="center"
          label="派单教务"
          prop="edu"
        >
        </el-table-column>
        <el-table-column
          label="老师基础报酬"
          align="center"
          prop="teacherBasicCompensation"
          sortable="custom"
          width="150"
        >
          <template slot-scope="scope">
            {{
              scope.row.teacherBasicCompensation
                ? scope.row.teacherBasicCompensation.toFixed(2)
                : ""
            }}
          </template>
        </el-table-column>
  
        <el-table-column
          align="center"
          label="保分"
          prop="teacherGuarantee"
          sortable="custom"
          width="120"
        >
        </el-table-column>
        <el-table-column
          align="center"
          label="保费"
          prop="teacherPremium"
          sortable="custom"
          width="120"
        >
          <template slot-scope="scope">
            {{ (Math.round(scope.row.teacherPremium * 100) / 100).toFixed(2) }}
          </template>
        </el-table-column>
  
        <el-table-column
          align="center"
          label="老师补价"
          prop="teacherSupplementaryValency"
          width="120"
        >
          <template slot-scope="scope">
            <span
              @click="lshoukankuangbuujuia(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
            <!-- {{
              (Math.round(scope.row.supplementaryValency * 100) / 100).toFixed(2)
            }} -->
            <br />
            <!-- <el-button type="primary" icon="el-icon-edit" circle></el-button> -->
          </template>
        </el-table-column>
        <el-table-column
          align="center"
          label="老师总报酬"
          prop="teacherTotalPrice"
          sortable="custom"
          width="150"
        >
          <template slot-scope="scope">
            {{
              scope.row.teacherTotalPrice
                ? scope.row.teacherTotalPrice.toFixed(2)
                : ""
            }}
          </template>
        </el-table-column>
  
        <el-table-column
          align="center"
          label="备注"
          sortable="custom"
          width="90"
          prop="teacherRemark"
        />
        <el-table-column align="center" label="结款记录" prop="settlementRecord">
          <template slot-scope="scope">
            <span
              @click="getjiekuans(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
          </template>
        </el-table-column>
  
        <el-table-column
          align="center"
          label="是否结完"
          prop="settlementStatus"
          width=""
        >
          <template slot-scope="scope">
            <span>
              {{ scope.row.settlementStatus == "0" ? "未结完" : "已结完" }}
            </span>
          </template>
        </el-table-column>
  
        <el-table-column
          align="center"
          label="老师成绩/反馈"
          sortable="custom"
          width="150"
          prop="teacherAchievement"
        />
  
        <el-table-column
          align="center"
          label="是否迟交"
          prop="teacherPostponeStatus"
          sortable="custom"
          width="120"
        >
          <template slot-scope="scope">
            <span v-if="scope.row.teacherPostponeStatus == 1">
              晚于老师交稿时间</span
            >
            <span v-if="scope.row.teacherPostponeStatus == 2">
              晚于学生要求时间</span
            >
            <span v-if="scope.row.teacherPostponeStatus == 3">
              晚于作业截止时间</span
            >
          </template>
        </el-table-column>
        <el-table-column
          align="center"
          label="退款原因"
          prop="customerRefundReason"
          width=""
        >
          <template slot-scope="scope">
            <span
              @click="tuikan(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
          </template></el-table-column
        >
        <el-table-column
          align="center"
          label="是否挂科"
          prop="customerFailExam"
          width=""
        >
          <template slot-scope="scope">
            <span
              @click="tuikan(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
          </template>
        </el-table-column>
        <el-table-column
          label="是否退保费"
          align="center"
          prop="customerReturnPremiumStatus"
          width="90"
        >
          <template slot-scope="scope">
            <span
              @click="tuikan(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
          </template></el-table-column
        >
  
        <el-table-column
          align="center"
          label="客户退款金额
  "
          prop="customerRefundAmount"
          width="100"
        >
          <template slot-scope="scope">
            <span
              @click="tuikan(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
          </template></el-table-column
        >
        <el-table-column
          align="center"
          label="客户实退金额
  "
          prop="customerRefundableAmount"
          width="100"
        >
          <template slot-scope="scope">
            <span
              @click="tuikan(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
          </template>
        </el-table-column>
  
        <el-table-column
          align="center"
          label="客户退款情况
  "
          prop="customerRefundStatus"
          width="100"
        >
          <template slot-scope="scope">
            <span
              @click="tuikan(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
          </template>
        </el-table-column>
  
        <el-table-column
          align="center"
          label="客户退款记录 
  "
          prop="customerRefundRecord"
          width="100"
        >
          <template slot-scope="scope">
            <span
              @click="tuikan(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
          </template></el-table-column
        >
  
        <el-table-column
          label="备注
  "
          align="center"
          prop="customerRemark"
          width=""
        >
          <!-- <template slot-scope="scope">
            <span
              @click="tuikan(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
          </template> -->
        </el-table-column>
  
        <el-table-column
          align="center"
          label="老师退款金额
  "
          prop="teacherRefundAmount"
          width="100"
        >
          <template slot-scope="scope">
            <span
              @click="laotuikan(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
          </template>
        </el-table-column>
  
        <el-table-column
          align="center"
          label="老师实退金额
  "
          prop="teacherActualRefundAmount"
          width="100"
        >
          <template slot-scope="scope">
            <span
              @click="laotuikan(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
          </template>
        </el-table-column>
        <el-table-column
          align="center"
          label="老师退款情况
  "
          prop="teacherRefundStatus"
          width="100"
        >
          <template slot-scope="scope">
            <span
              @click="laotuikan(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
          </template>
        </el-table-column>
        <el-table-column
          align="center"
          label="老师退款记录
  "
          prop="teacherRefundRecord"
          width="100"
        >
          <template slot-scope="scope">
            <span
              @click="laotuikan(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
          </template>
        </el-table-column>
  
        <el-table-column
          align="center"
          label="备注
  "
          prop="remark"
          width=""
        >
        </el-table-column>
  
        <el-table-column
          align="center"
          label="本单成绩/总成绩
  "
          prop="singleScore"
          width="150"
        >
        </el-table-column>
  
        <el-table-column
          align="center"
          label="是否挂科
  "
          prop="customerFailExam"
          width=""
        >
        <template slot-scope="scope">
         {{scope.row.customerFailExam==1?'是':'否'}}
          
          </template>
        </el-table-column>
        <el-table-column
          align="center"
          label="保分状态
  "
          prop="guaranteeStatus"
          width=""
        >
        </el-table-column>
        
        <el-table-column
          align="center"
          label="总体得分
  "
          sortable="custom"
          width="120"
          prop="singleScore"
        >
        <template slot-scope="scope">
            <span v-if="scope.row.orderEvaluate!==null"> 
              <span
              @click="defen(scope.row)"
              style="cursor: pointer; color: #1890ff"
              >查看>></span
            >
            <!-- {{Number(scope.row.orderEvaluate.serviceEvaluate)
            +Number(scope.row.orderEvaluate.servicePrescriptionSatisfaction)
            +Number(scope.row.orderEvaluate.selectServiceAgain)+Number(scope.row.orderEvaluate.teacherContentSatisfaction)
            +Number(scope.row.orderEvaluate.teacherServiceSatisfaction)
            +Number(scope.row.orderEvaluate.teacherServiceSatisfaction)
            +Number(scope.row.orderEvaluate.teacherPrescriptionSatisfaction)
            +Number(scope.row.orderEvaluate.teacherSelectAgain)
        
            }}分 -->
            </span>
          
          </template>
      </el-table-column>
  
        <el-table-column
          align="center"
          label="老师得分
  "
          prop="singleEvaluation"
          sortable="custom"
          width="120"
        >
        <template slot-scope="scope">
            <span v-if="scope.row.orderEvaluate!==null"> 
            
            {{Number(scope.row.orderEvaluate.teacherContentSatisfaction)
            +Number(scope.row.orderEvaluate.teacherServiceSatisfaction)
            
            +Number(scope.row.orderEvaluate.teacherPrescriptionSatisfaction)
            +Number(scope.row.orderEvaluate.teacherSelectAgain)
            }}分
            </span>
            <span v-else>/</span>
          </template></el-table-column>
        <el-table-column
          align="center"
          label="客服得分
  "
          prop="singleEvaluation"
          sortable="custom"
          width="120"
        >
        <template slot-scope="scope">
            <span v-if="scope.row.orderEvaluate!==null"> 
            
            {{Number(scope.row.orderEvaluate.serviceEvaluate)
            +Number(scope.row.orderEvaluate.servicePrescriptionSatisfaction)
            +Number(scope.row.orderEvaluate.selectServiceAgain)
        
            }}分
            </span>
          <span v-else>/</span>
          </template>
      </el-table-column>
        <el-table-column
          align="center"
          label="客诉
  "
          prop="questionnaireStatus"
          sortable="custom"
          width="120"
        >
          <template slot-scope="scope">
            <span v-show="scope.row.complaintStatus == '0'"> 无客诉</span>
            <span v-show="scope.row.complaintStatus == '1'"> 客诉待处理</span>
            <span v-show="scope.row.complaintStatus == '2'"> 客诉已处理</span>
          </template></el-table-column
        >
        <el-table-column
          align="center"
          label="服务满意度问卷
  "
          prop="questionnaireStatus"
          sortable="custom"
          width="180"
        >
        <template slot-scope="scope">
          <!-- <span v-if="scope.row.orderEvaluate !== null"> 已发出</span>
            <span v-else> 未发出</span> -->
            <span v-if="scope.row.questionnaireStatus == '1'"> 已生成</span>
            <span v-else> 未生成</span>
          </template></el-table-column>
  
        <el-table-column
          align="center"
          label="操作"
          width="150"
          fixed="right"
          class-name="small-padding fixed-width"
        >
          <template slot-scope="scope" v-if="scope.row.roleId !== 1">
            <div v-if="queryParams.delFlag == 0">
              <el-button
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="handleUpdate(scope.row)"
                
                >修改</el-button
              >
              <el-button
                size="mini"
                type="text"
                icon="el-icon-delete"
                @click="shoukankuang(scope.row)"
                v-hasPermi="['system:role:remove']"
                >收款</el-button
              >
              <el-dropdown
                size="mini"
                @command="(command) => handleCommand(command, scope.row)"
                
              >
                <el-button size="mini" type="text" icon="el-icon-d-arrow-right"
                  >更多</el-button
                >
                <el-dropdown-menu slot="dropdown">
                  <el-dropdown-item
                    command="shoukuan"
                    icon="el-icon-circle-check"
                    
                    >删除</el-dropdown-item
                  >
                  <el-dropdown-item
                    command="bujia"
                    icon="el-icon-circle-plus-outline"
                    
                    >学生补价</el-dropdown-item
                  >
                  <!-- <el-dropdown-item
                    :disabled="
                      !(
                        scope.row.orderTaskList.length &&
                        scope.row.orderTaskList.every(
                          (item) => item.submitStatus && item.submitStatus != '0'
                        )
                      )
                    "
                    command="xiugaifankui"
                    icon="el-icon-edit"
                    
                    >反馈</el-dropdown-item
                  > -->
                  <el-dropdown-item
                    command="chengjifasnkui"
                    icon="el-icon-date"
                    
                    >录入成绩反馈</el-dropdown-item
                  >
                  <el-dropdown-item
                    v-if="scope.row.complaintStatus != '1'"
                    command="kesu"
                    icon="el-icon-circle-plus-outline"
                    
                    >客诉</el-dropdown-item
                  >
                  <el-dropdown-item
                  v-if="scope.row.complaintStatus == '1'"
                    command="kesuwanjie"
                    icon="el-icon-circle-plus-outline"
                    
                    >客诉完结</el-dropdown-item
                  >
                  <el-dropdown-item
                    command="tuikuan"
                    icon="el-icon-circle-close"
                    
                    >退款</el-dropdown-item
                  >
                  <el-dropdown-item
                    command="laoshibujia"
                    icon="el-icon-circle-plus-outline"
                    
                    >老师补价</el-dropdown-item
                  >
                  <el-dropdown-item
                    command="laoshituikuan"
                    icon="el-icon-circle-close"
                    
                    >老师退款</el-dropdown-item
                  >
                  <el-dropdown-item
                    command="jiekuan"
                    icon="el-icon-circle-close"
                    
                    >结款</el-dropdown-item
                  >
                  <el-dropdown-item
                    command="wenjuan"
                    icon="el-icon-circle-close"
                    
                    >问卷</el-dropdown-item
                  >
                </el-dropdown-menu>
              </el-dropdown>
            </div>
  
            <el-button
              v-if="queryParams.delFlag == 2"
              size="mini"
              type="text"
              icon="el-icon-edit"
              @click="huifu(scope.row)"
              
              >恢复</el-button
            >
          </template>
        </el-table-column>
      </el-table>
  
      <pagination
        v-show="total > 0"
        :total="total"
        :page-sizes="[10, 20, 30, 50,100]"
        :page.sync="queryParams.pageNo"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />
  
      <!-- 添加或修改角色配置对话框 -->
      <el-dialog
        :close-on-click-modal="false"
        :title="title"
        :visible.sync="open"
        width="700px"
        append-to-body
      >
        <div style="display: flex; margin-bottom: 50px; align-items: center">
          <div
            style="
              width: 100px;
              font-weight: 700;
  
              text-align: right;
            "
          >
            自动识别：
          </div>
          <el-input type="textarea" placeholder="请输入内容" v-model="shibie">
          </el-input>
          <el-button
            @click="shibiekaishi"
            size="mini"
            style="margin-left: 10px"
            type="primary"
            round
            >开始识别</el-button
          >
          <el-button
            @click="shibiekaishifan"
            size="mini"
            style="margin-left: 10px"
            type="primary"
            round
            >导出</el-button
          >
        </div>
  
        <el-form ref="form" :model="lstform" :rules="rules" label-width="180px">
          <el-form-item label="单号" prop="orderNumber">
            <el-input v-model="lstform.orderNumber" placeholder="请输入订单号" />
          </el-form-item>
  
          <el-form-item label="客户昵称" prop="customerNickname">
            <el-input
              v-model="lstform.customerNickname"
              placeholder="请输入客户昵称"
            />
          </el-form-item>
  
          <el-form-item label="所在账号">
            <el-input v-model="lstform.account" placeholder="请输入所在账号" />
          </el-form-item>
  
          <el-form-item label="任务类型" prop="taskType">
            <el-select
              v-model="lstform.taskType"
              clearable
              placeholder="请选择任务类型"
            >
              <el-option
                v-for="item in renwuleixing"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item prop="country" label="国家（地区）">
            <!-- <el-input
              v-model=""
              placeholder="请输入国家（地区）"
            /> -->
            <el-select v-model="lstform.country" placeholder="请选择">
              <el-option
                v-for="item in scountry"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
  
          <el-form-item label="学校">
            <el-input v-model="lstform.school" placeholder="请输入学校" />
          </el-form-item>
  
          <el-form-item label="阶段">
            <el-select
              v-model="lstform.phase"
              clearable
              placeholder="请选择任务类型"
            >
              <el-option
                v-for="item in jieduan"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
  
          <el-card class="box-card">
            <div slot="header" class="clearfix">
              <span>任务</span>
              <el-button
                @click="addrenwu"
                style="float: right; padding: 3px 0"
                type="text"
                >增加任务</el-button
              >
            </div>
            <div
              v-for="(item, index) in lstform.orderTaskList"
              :key="index"
              class="text item"
            >
              <el-form-item label="专业/科目/工作量">
                <el-input
                  v-model="item.workTask"
                  placeholder="请输入专业/科目/工作量"
                />
              </el-form-item>
              <el-form-item label="分数占比">
                <el-input
                  v-model="item.fraction"
                  placeholder="请输入分数占比 无数据"
                />
              </el-form-item>
              <el-form-item label="老师交稿ddl">
                <el-date-picker
                  value-format="yyyy-MM-dd HH:mm:ss"
                  v-model="item.submissionTask"
                  type="datetime"
                  placeholder="选择日期时间"
                >
                </el-date-picker>
              </el-form-item>
  
              <el-form-item label="学生要求交稿ddl">
                <el-date-picker
                  value-format="yyyy-MM-dd HH:mm:ss"
                  v-model="item.studentDeadlineTask"
                  type="datetime"
                  placeholder="选择日期时间"
                >
                </el-date-picker>
              </el-form-item>
              <el-form-item label="实际截止ddl/考试时间">
                <el-date-picker
                  value-format="yyyy-MM-dd HH:mm:ss"
                  v-model="item.deadlineTask"
                  type="datetime"
                  placeholder="选择日期时间"
                >
                </el-date-picker>
              </el-form-item>
  
              <!-- <el-form-item label="是否交稿">
                <el-select
                  v-model="item.submitStatus"
                  clearable
                  placeholder="请选择是否交稿"
                >
                  <el-option
                    v-for="item in jiaogao"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </el-form-item> -->
  
              <p style="text-align: center; color: #1890ff">
                <span
                  v-show="lstform.orderTaskList.length > 1"
                  style="cursor: pointer"
                  @click="removerenwu(index)"
                >
                  删除任务
                </span>
              </p>
            </div>
          </el-card>
          <el-form-item style="margin-top: 20px" label="选档" prop="directSelect">
            <el-select
              v-model="lstform.directSelect"
              clearable
              placeholder="请选择选档"
            >
              <el-option
                v-for="item in xuandang"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
  
          <!-- <el-form-item label="已收款金额" prop="amountReceived">
            <el-input
              @blur="formatAmount('amountReceived')"
              v-model="lstform.amountReceived"
              placeholder="请输入已收款金额"
            />
          </el-form-item>
   
          <el-form-item label="未收款金额" prop="outstandingAmount">
            <el-input
              @blur="formatAmount('outstandingAmount')"
              v-model="lstform.outstandingAmount"
              placeholder="请输入未收款金额"
            />
          </el-form-item> -->
  
          <!-- <el-form-item label="补价">
            <el-input
              @blur="formatAmount('supplementaryValency')"
              v-model="lstform.supplementaryValency"
              placeholder="请输入补价"
            />
          </el-form-item> -->
  
          <el-form-item label="保费">
            <el-input
              @blur="formatAmount('parcelInsurance')"
              v-model="lstform.parcelInsurance"
              placeholder="请输入保费"
            />
          </el-form-item>
  
          <el-form-item label="保分/保费">
            <el-input v-model="lstform.guarantee" placeholder="请输入保分/保费" />
          </el-form-item>
  
          <el-form-item label="成交价" prop="transactionPrice">
            <el-input
              @blur="formatAmount('transactionPrice')"
              v-model="lstform.transactionPrice"
              placeholder="请输入成交价"
            />
          </el-form-item>
          <el-form-item label="本单应收" prop="billReceivable">
            <el-input
              @blur="formatAmount('billReceivable')"
              v-model="lstform.billReceivable"
              placeholder="请输入本单应收"
            />
          </el-form-item>
          <!-- <el-form-item label="本单实收" prop="officialReceipts">
            <el-input
              @blur="formatAmount('officialReceipts')"
              v-model="lstform.officialReceipts"
              placeholder="请输入本单实收"
            />
          </el-form-item> -->
  
          <!-- <el-form-item label="收款情况">
            <el-input
            
              v-model="lstform.collectionSituation"
              placeholder="请输入收款情况"
            />
          </el-form-item> -->
  
          <el-form-item label="储值剩余">
            <el-input
              @blur="formatAmount('remainingSum')"
              v-model="lstform.remainingSum"
              placeholder="请输入储值剩余"
            />
          </el-form-item>
  
          <el-form-item label="储值备注">
            <el-input
              
              v-model="lstform.remainingSumRemark"
              placeholder="请输入储值备注"
            />
          </el-form-item>
  
          <el-form-item label="成单客服" prop="orderService">
            <el-input
              disabled
              v-model="lstform.orderService"
              placeholder="请输入成单客服"
            />
          </el-form-item>
  
          <el-form-item label="引流销售" prop="drainageService">
            <el-input
              v-model="lstform.drainageService"
              placeholder="请输入引流客服"
            />
          </el-form-item>
  
          <el-form-item label="客户属性" prop="customerAttribute">
            <el-input
              v-model="lstform.customerAttribute"
              placeholder="请输入客户属性"
            />
          </el-form-item>
          <el-form-item label="询单号" >
            <el-input
              v-model="lstform.followNumber"
              placeholder="请输入询单号"
            />
          </el-form-item>
          
          <div v-if="title !== '添加'">
            <el-form-item label="挂科率">
              <el-input
                @blur="formatAmount('failRate')"
                v-model="lstform.failRate"
                placeholder="请输入挂科率"
              />
            </el-form-item>
  
            <el-form-item label="及时率">
              <el-input
                @blur="formatAmount('timelinessRatio')"
                v-model="lstform.timelinessRatio"
                placeholder="请输入及时率"
              />
            </el-form-item>
  
            <el-form-item label="老师">
              <el-input v-model="lstform.teacherName" placeholder="请输入老师" />
            </el-form-item>
            <el-form-item label="派单教务">
              <el-select
            v-model="lstform.edu"
            placeholder=""
            clearable
            style="width: 240px"
          >
            <el-option
              v-for="dict in rgrfghr"
              :key="dict.userName"
              :label="dict.userName"
              :value="dict.userName"
            />
          </el-select>
            </el-form-item>
            <el-form-item label="老师基础报酬">
              <el-input
                @blur="formatAmount('teacherBasicCompensation')"
                v-model="lstform.teacherBasicCompensation"
                placeholder="请输入老师基础报酬"
              />
            </el-form-item>
  
            <el-form-item
              label="老师保分
  "
            >
              <el-input
                v-model="lstform.teacherGuarantee"
                placeholder="请输入保分
  "
              />
            </el-form-item>
  
            <el-form-item
              label="保费
  "
            >
              <el-input
                v-model="lstform.teacherPremium"
                placeholder="请输入保费
  "
              />
            </el-form-item>
  
            <!-- <el-form-item
              label="补价
  "
            >
              <el-input
                @blur="formatAmount('teacherSupplementaryValency')"
                v-model="lstform.teacherSupplementaryValency"
                placeholder="请输入补价
  "
              />
            </el-form-item> -->
  <!-- 
            <el-form-item
              label="老师总报酬
  "
            >
              <el-input
                @blur="formatAmount('teacherTotalPrice')"
                v-model="lstform.teacherTotalPrice"
                placeholder="老师总报酬
  
  "
              />
            </el-form-item> -->
  
            <el-form-item
              label="备注
  "
            >
              <el-input
                v-model="lstform.teacherRemark"
                placeholder="备注
  
  "
              />
            </el-form-item>
  
            <el-form-item
              label="结款记录
  "
            >
              <el-input
                disabled
                v-model="lstform.settlementRecord"
                placeholder="结款记录
  
  "
              />
            </el-form-item>
  
            <el-form-item
              label="是否结完
  "
            >
              <el-input
                disabled
                v-model="lstform.settlementStatus"
                placeholder="是否结完
  
  "
              />
            </el-form-item>
  
            <el-form-item
              label="老师成绩/反馈
  "
            >
              <el-input
                v-model="lstform.singleScore"
                placeholder="老师成绩/反馈
  
  "
              />
            </el-form-item>
  
            <el-form-item
              label="是否迟交
  "
            >
              <el-input
                disabled
                v-model="lstform.teacherPostponeStatus"
                placeholder="请输入是否迟交
  
  "
              />
            </el-form-item>
  
            <el-form-item
              label="退款原因
  
  "
            >
              <el-input
                v-model="lstform.customerRefundReason"
                placeholder="请输入退款原因
  
  
  "
              />
            </el-form-item>
  
            <el-form-item
              label="是否挂科
  
  "
            >
              <el-input
                v-model="lstform.customerFailExam"
                placeholder="请输入是否挂科
  
  
  "
              />
            </el-form-item>
  
            <el-form-item
              label="是否退保费
  
  
  "
            >
              <el-input
                v-model="lstform.customerReturnPremiumStatus"
                placeholder="请输入是否退保费
  
  
  
  "
              />
            </el-form-item>
  
            <el-form-item label="客户退款金额">
              <el-input
                @blur="formatAmount('customerRefundAmount')"
                v-model="lstform.customerRefundAmount"
                placeholder="请输入客户退款金额
  "
              />
            </el-form-item>
  
            <el-form-item label="客户实退金额">
              <el-input
                @blur="formatAmount('customerRefundableAmount')"
                v-model="lstform.customerRefundableAmount"
                placeholder="请输入客户实退金额
  "
              />
            </el-form-item>
  
            <el-form-item label="客户退款情况">
              <el-input
                disabled
                v-model="lstform.customerRefundStatus"
                placeholder="请输入客户退款情况
  "
              />
            </el-form-item>
  
            <el-form-item label="备注">
              <el-input
                v-model="lstform.customerRemark"
                placeholder="请输入客户退款备注
  "
              />
            </el-form-item>
  
            <el-form-item label="老师退款金额">
              <el-input
                @blur="formatAmount('teacherRefundAmount')"
                v-model="lstform.teacherRefundAmount"
                placeholder="请输入老师退款金额
  "
              />
            </el-form-item>
  
            <el-form-item label="老师实退金额">
              <el-input
                @blur="formatAmount('teacherActualRefundAmount')"
                v-model="lstform.teacherActualRefundAmount"
                placeholder="请输入老师实退金额
  "
              />
            </el-form-item>
  
            <el-form-item label="老师退款情况">
              <el-input
                v-model="lstform.teacherRefundStatus"
                placeholder="请输入老师退款情况
  "
              />
            </el-form-item>
  
            <el-form-item label="老师退款记录">
              <el-input
                v-model="lstform.teacherRefundRecord"
                placeholder="请输入老师退款记录
  "
              />
            </el-form-item>
  
            <el-form-item label="备注">
              <el-input
                v-model="lstform.remark"
                placeholder="请输入备注
  "
              />
            </el-form-item>
  
            <!-- <el-form-item label="本单得分">
              <el-input
                v-model="lstform.singleScore"
                placeholder="请输入本单得分
  "
              />
            </el-form-item> -->
  
            <el-form-item label="本单评价">
              <el-input
                v-model="lstform.singleEvaluation"
                placeholder="请输入本单评价
  "
              />
            </el-form-item>
            <el-form-item label="服务满意度问卷">
              <el-input
                v-model="lstform.questionnaireStatus"
                placeholder="请输入服务满意度问卷
  "
              />
            </el-form-item>
          </div>
        </el-form>
        <div
          style="
            position: fixed;
            bottom: 0px;
            padding-bottom: 5px;
            left: 50%;
            width: 680px;
            text-align: center;
            transform: translateX(-50%);
            background: #fff;
          "
          slot="footer"
          class="dialog-footer"
        >
          <el-button @click="cancel">取 消</el-button>
          <el-button type="primary" @click="submitForm">确 定</el-button>
        </div>
      </el-dialog>
  
      <el-dialog
        @close="qingko"
        title="新增任务"
        :close-on-click-modal="false"
        :visible.sync="renwuloding"
      >
        <el-form
          :model="ruleForm"
          :rules="ruless"
          ref="ruleForm"
          label-width="180px"
          class="demo-ruleForm"
        >
          <el-form-item prop="workTask" label="专业/科目/工作量">
            <el-input
              v-model="ruleForm.workTask"
              placeholder="请输入专业/科目/工作量"
            />
          </el-form-item>
          <el-form-item label="分数占比">
            <el-input v-model="ruleForm.fraction" placeholder="请输入分数占比 " />
          </el-form-item>
          <el-form-item prop="submissionTask" label="老师交稿ddl">
            <el-date-picker
              value-format="yyyy-MM-dd HH:mm:ss"
              v-model="ruleForm.submissionTask"
              type="datetime"
              placeholder="选择日期时间"
            >
            </el-date-picker>
          </el-form-item>
  
          <el-form-item prop="studentDeadlineTask" label="学生要求交稿ddl">
            <el-date-picker
              value-format="yyyy-MM-dd HH:mm:ss"
              v-model="ruleForm.studentDeadlineTask"
              type="datetime"
              placeholder="选择日期时间"
            >
            </el-date-picker>
          </el-form-item>
          <el-form-item prop="deadlineTask" label="实际截止ddl/考试时间">
            <el-date-picker
              value-format="yyyy-MM-dd HH:mm:ss"
              v-model="ruleForm.deadlineTask"
              type="datetime"
              placeholder="选择日期时间"
            >
            </el-date-picker>
          </el-form-item>
  
          <!-- <el-form-item label="是否交稿">
            <el-select
              v-model="ruleForm.submitStatus"
              clearable
              placeholder="请选择是否交稿"
            >
              <el-option
                v-for="item in jiaogao"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>jiaogao
            </el-select>
          </el-form-item> -->
        </el-form>
        <div slot="footer" class="dialog-footer" style="text-align: center">
          <el-button @click="renwuloding = false">取 消</el-button>
          <el-button type="primary" @click="addrexnwu">确 定</el-button>
        </div>
      </el-dialog>
  
      <!-- <div class="qrcode">
        <h1>生成二维码</h1>
        <label for="text">请输入要转换为二维码的内容：</label>
        <input
          type="text"
          id="text"
          v-model="text"
          @keyup.enter="generateQRCode"
        />
        <button @click="generateQRCode">生成</button>
        <div ref="qrcode" style="margin: 0 auto"></div>
      </div>  -->
  
      <!-- 新增结款 -->
      <el-dialog
        @close="guanbijiekuan"
        :title="jiekuantitle"
        :destroy-on-close="true"
        :close-on-click-modal="false"
        :visible.sync="laoshikong"
      >
        <el-form
          :model="jiekuanForm"
          :rules="rulejiekuanForm"
          ref="jiekuanForm"
          label-width="180px"
          class="demo-ruleForm"
        >
          <el-form-item prop="paymentAmount" label="结款金额">
            <el-input
              @blur="jieAmount('paymentAmount')"
              v-model="jiekuanForm.paymentAmount"
              placeholder="请输入结款金额"
            />
          </el-form-item>
  
          <el-form-item prop="collectionChannel" label="备注">
            <el-input
              v-model="jiekuanForm.collectionChannel"
              placeholder="请输入备注"
            />
          </el-form-item>
          <!-- <el-form-item prop="remark" label="备注">
            <el-input v-model="jiekuanForm.remark" placeholder="" />
          </el-form-item> -->
        </el-form>
        <div slot="footer" class="dialog-footer" style="text-align: center">
          <el-button @click="laoshikong = false">取 消</el-button>
          <el-button type="primary" @click="addjiekuan">确 定</el-button>
        </div>
      </el-dialog>
      <!-- 结款记录 -->
      <el-dialog
        title="结款记录"
        :destroy-on-close="true"
        :close-on-click-modal="false"
        :visible.sync="jiekuanloding"
      >
        <el-table height="400px" :data="jiegridData">
          <el-table-column
            property="createBy"
            label="创建人"
            width="150"
          ></el-table-column>
          <el-table-column
            property="createTime"
            label="创建时间"
            width="200"
          ></el-table-column>
          <el-table-column
            property="paymentAmount"
            label="结款金额"
          ></el-table-column>
          <el-table-column
            property="collectionChannel"
            label="备注"
          ></el-table-column>
  
          <el-table-column
            align="center"
            label="操作"
            width="150"
            fixed="right"
            class-name="small-padding fixed-width"
          >
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="xiugaijiekuan(scope.row)"
                >修改
              </el-button>
              <el-button
                size="mini"
                type="text"
                icon="el-icon-delete"
                @click="shanda(scope.row)"
                >删除</el-button
              >
            </template>
          </el-table-column>
        </el-table>
        <div slot="footer" class="dialog-footer" style="text-align: center">
          <el-button @click="jiekuanloding = false">取 消</el-button>
          <el-button type="primary" @click="laoshijiekuanjji">新增</el-button>
        </div>
      </el-dialog>
  
      <!-- 收款记录 -->
      <el-dialog
        title="收款情况"
        :destroy-on-close="true"
        :close-on-click-modal="false"
        :visible.sync="shoukuanloding"
      >
        <el-table height="400px" :data="shoukuantab">
          <el-table-column
            property="createBy"
            label="收款人"
            width="100"
          ></el-table-column>
          <el-table-column
            property="createTime"
            label="收款时间"
            width="200"
          ></el-table-column>
          <el-table-column
            property="amountCollected"
            label="收款金额"
          ></el-table-column>
          <el-table-column
            property="paymentTerm"
            label="收款方式"
          ></el-table-column>
          <el-table-column
            property="serviceCharge"
            label="是否有手续费"
          ></el-table-column>
          <el-table-column
            align="center"
            label="操作"
            width="150"
            class-name="small-padding fixed-width"
          >
            <template slot-scope="scope" v-if="scope.row.roleId !== 1">
              <el-button
                size="mini"
                type="text"
                icon="el-icon-delete"
                @click="shanshoukan(scope.row)"
                >删除</el-button
              >
            </template>
          </el-table-column>
        </el-table>
        <div slot="footer" class="dialog-footer" style="text-align: center">
          <el-button @click="shoukuanloding = false">取 消</el-button>
          <el-button type="primary" @click="xinzengshoukuan">新增</el-button>
        </div>
      </el-dialog>
      <!-- 新增收款 -->
      <el-dialog
        @close="guanbishoukan"
        title="收款"
        :destroy-on-close="true"
        :close-on-click-modal="false"
        :visible.sync="shoukuankong"
      >
        <el-form
          :model="shoukanfrom"
          :rules="reshoukanfrom"
          @close="guanbishoukan"
          ref="shoukanfrom"
          label-width="180px"
          class="demo-ruleForm"
        >
          <el-form-item prop="amountCollected" label="收款金额">
            <el-input
              @blur="shouAmount('amountCollected')"
              v-model="shoukanfrom.amountCollected"
              placeholder="请输入收款金额"
            />
          </el-form-item>
  
          <el-form-item label="收款方式">
            <el-select
              v-model="shoukanfrom.paymentTerm"
              placeholder=""
              clearable
              style="width: 240px"
            >
              <el-option
                v-for="dict in [
                  { value: '微信经营码', label: '微信经营码' },
                  { value: '企业微信', label: '企业微信' },
                  { value: '支付宝', label: '支付宝' },
                  { value: '对公转账', label: '对公转账' },
                  { value: '微信转账', label: '微信转账' },
                  { value: '外币', label: '外币' },
                  { value: '其他', label: '其他' },
                ]"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="是否有手续费">
            <el-select v-model="shoukanfrom.serviceCharge" placeholder="请选择">
              <el-option
                v-for="item in shouxu"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <!-- <el-form-item prop="remark" label="备注">
            <el-input v-model="jiekuanForm.remark" placeholder="" />
          </el-form-item> -->
        </el-form>
        <div slot="footer" class="dialog-footer" style="text-align: center">
          <el-button @click="shoukuankong = false">取 消</el-button>
          <el-button type="primary" @click="addshoukuan">确 定</el-button>
        </div>
      </el-dialog>
  
      <!-- 客诉  -->
      <el-dialog
        @close="guanbishoukan"
        title="客诉"
        :destroy-on-close="true"
        :close-on-click-modal="false"
        :visible.sync="kesufromkonga"
      >
        <el-form
          :model="kesufrom"
          :rules="rekesugfro"
          @close="guanbishoukan"
          ref="kesufrom"
          label-width="180px"
          class="demo-ruleForm"
        >
          <el-form-item prop="reason" label="客诉原因">
            <el-input v-model="kesufrom.reason" placeholder="请输入客诉原因" />
          </el-form-item>
  
          <el-form-item label="客诉需求">
            <el-input v-model="kesufrom.appeal" placeholder="请输入客诉需求" />
          </el-form-item>
  
          <!-- <el-form-item prop="remark" label="备注">
            <el-input v-model="jiekuanForm.remark" placeholder="" />
          </el-form-item> -->
        </el-form>
        <div slot="footer" class="dialog-footer" style="text-align: center">
          <el-button @click="kesufromkonga = false">取 消</el-button>
          <el-button type="primary" @click="addkesufrom">确 定</el-button>
        </div>
      </el-dialog>
  
      <!-- 处理客诉 -->
      <!-- 客诉  -->
      <el-dialog
        @close="guanbishoukan"
        title="客诉完结"
        :destroy-on-close="true"
        :close-on-click-modal="false"
        :visible.sync="wanjiekopng"
      >
        <el-form
          :model="kesuwanfrom"
          :rules="kesuwanfromre"
          @close="guanbishoukan"
          ref="wanjie"
          label-width="180px"
          class="demo-ruleForm"
        >
          <el-form-item prop="disposeResult" label="处理结果">
            <el-input
              v-model="kesuwanfrom.disposeResult"
              placeholder="请输入处理结果"
            />
          </el-form-item>
          <el-form-item label="教务意见">
            <el-input
              v-model="kesuwanfrom.academicOpinion"
              placeholder="请输入处理结果"
            />
          </el-form-item>
  
          <el-form-item label="审核专员意见">
            <el-input
              v-model="kesuwanfrom.auditorOpinion"
              placeholder="请输入处理结果"
            />
          </el-form-item>
          <!-- <el-form-item label="客诉需求">
            <el-input v-model="kesufrom.appeal" placeholder="请输入客诉需求" />
          </el-form-item> -->
  
          <!-- <el-form-item prop="remark" label="备注">
            <el-input v-model="jiekuanForm.remark" placeholder="" />
          </el-form-item> -->
        </el-form>
        <div slot="footer" class="dialog-footer" style="text-align: center">
          <el-button @click="wanjiekopng = false">取 消</el-button>
          <el-button type="primary" @click="wanjjie">确 定</el-button>
        </div>
      </el-dialog>
      <!-- 反馈 -->
      <el-dialog
        title="反馈"
        :destroy-on-close="true"
        :close-on-click-modal="false"
        :visible.sync="fankuidiong"
      >
        <el-form
          :model="fankuodata"
          :rules="fankuifromrule"
          ref="fankuiForm"
          label-width="180px"
          class="demo-ruleForm"
        >
          <div
            style="border: 1px solid #000; margin: 10px 0; padding: 5px"
            v-for="(item, index) in fankuodata.orderTaskList"
            :key="index"
            class="text item"
          >
            <el-form-item label="老师交稿ddl">
              <el-date-picker
                value-format="yyyy-MM-dd HH:mm:ss"
                v-model="item.submissionTask"
                type="datetime"
                placeholder="选择日期时间"
              >
              </el-date-picker>
            </el-form-item>
  
            <el-form-item label="学生要求交稿ddl">
              <el-date-picker
                value-format="yyyy-MM-dd HH:mm:ss"
                v-model="item.studentDeadlineTask"
                type="datetime"
                placeholder="选择日期时间"
              >
              </el-date-picker>
            </el-form-item>
            <el-form-item label="实际截止ddl/考试时间">
              <el-date-picker
                value-format="yyyy-MM-dd HH:mm:ss"
                v-model="item.deadlineTask"
                type="datetime"
        fank反馈        placeholder="选择日期时间"
              >
              </el-date-picker>
            </el-form-item>
          </div>
  
          <el-form-item prop="orderStatus" label="重要程度">
            <el-select v-model="fankuodata.orderStatus" placeholder="请选择">
              <el-option
                v-for="item in fank"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
  
          <!-- <el-form-item prop="remark" label="备注">
            <el-input v-model="jiekuanForm.remark" placeholder="" />
          </el-form-item> -->
        </el-form>
        <div slot="footer" class="dialog-footer" style="text-align: center">
          <el-button @click="fankuidiong = false">取 消</el-button>
          <el-button type="primary" @click="addjiekuans">确 定</el-button>
        </div>
      </el-dialog>
  
  
  
    <!-- 反馈 -->
    <el-dialog
        title="反馈"
        :destroy-on-close="true"
        :close-on-click-modal="false"
        :visible.sync="dfada"
      >
        <el-form
          :model="jiaofankuifrom"
          :rules="jiaofankuifromre"
          ref="fankuiForm"
          label-width="180px"
          class="demo-ruleForm"
        >
          <div
            style="border: 1px solid #000; margin: 10px 0; padding: 5px"
           
            class="text item"
          >
            <el-form-item label="老师交稿ddl">
              <el-date-picker
                value-format="yyyy-MM-dd HH:mm:ss"
                v-model="jiaofankuifrom.submissionTask"
                type="datetime"
                placeholder="选择日期时间"
              >
              </el-date-picker>
            </el-form-item>
  
            <el-form-item label="学生要求交稿ddl">
              <el-date-picker
                value-format="yyyy-MM-dd HH:mm:ss"
                v-model="jiaofankuifrom.studentDeadlineTask"
                type="datetime"
                placeholder="选择日期时间"
              >
              </el-date-picker>
            </el-form-item>
            <el-form-item label="实际截止ddl/考试时间">
              <el-date-picker
                value-format="yyyy-MM-dd HH:mm:ss"
                v-model="jiaofankuifrom.deadlineTask"
                type="datetime"
                placeholder="选择日期时间"
              >
              </el-date-picker>
            </el-form-item>
          </div>
  
          <el-form-item prop="orderStatus" label="重要程度">
            <el-select v-model="jiaofankuifrom.orderStatus" placeholder="请选择">
              <el-option
                v-for="item in fank"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
  
          <!-- <el-form-item prop="remark" label="备注">
            <el-input v-model="jiekuanForm.remark" placeholder="" />
          </el-form-item> -->
        </el-form>
        <div slot="footer" class="dialog-footer" style="text-align: center">
          <el-button @click="dfada = false">取 消</el-button>
          <el-button type="primary" @click="baijnidnsdas">确 定</el-button>
        </div>
      </el-dialog>
  
      <!-- 补加记录 -->
  
    
      <el-dialog
        :title="bujiatitle"
        :destroy-on-close="true"
        :close-on-click-modal="false"
        :visible.sync="bujiakong"
      >
        <el-table height="400px" :data="bujiadata">
          <el-table-column
            property="createTime"
            label="补价时间"
            width=""
          ></el-table-column>
          <el-table-column
            property="furtherChargeUser"
            label="补价人"
            width=""
          ></el-table-column>
          <el-table-column
            property="premiumAmount"
            label="补价金额"
            width=""
          ></el-table-column>
          <el-table-column
            align="center"
            label="操作"
            width="150"
            class-name="small-padding fixed-width"
          >
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="text"
                icon="el-icon-delete"
                @click="bujiakonsgs(scope.row)"
                >修改</el-button
              >
              <el-button
                size="mini"
                type="text"
                icon="el-icon-delete"
                @click="shanbu(scope.row.furtherChargeId)"
                >删除</el-button
              >
            </template>
          </el-table-column>
        </el-table>
        <div slot="footer" class="dialog-footer" style="text-align: center">
          <el-button @click="bujiakong = false">取 消</el-button>
          <el-button type="primary" @click="bujiakongs">新增</el-button>
        </div>
      </el-dialog>
      <!-- 补价 -->
      <el-dialog
        @close="bujiaguasn"
        :title="bujiatitle"
        :destroy-on-close="true"
        :close-on-click-modal="false"
        :visible.sync="bujiadolog"
      >
        <el-form
          :model="bujiafrom"
          :rules="bujiaomre"
          ref="buusjias"
          label-width="180px"
          class="demo-ruleForm"
        >
          <el-form-item prop="premiumAmount" label="补价金额">
            <el-input
              @blur="bujiaformatAmount('premiumAmount')"
              v-model="bujiafrom.premiumAmount"
              placeholder="请输入补价金额"
            />
          </el-form-item>
  
          <!-- <el-form-item label="客诉需求">
            <el-input v-model="kesufrom.appeal" placeholder="请输入客诉需求" />
          </el-form-item> -->
  
          <!-- <el-form-item prop="remark" label="备注">
            <el-input v-model="jiekuanForm.remark" placeholder="" />
          </el-form-item> -->
        </el-form>
        <div slot="footer" class="dialog-footer" style="text-align: center">
          <el-button @click="bujiadolog = false">取 消</el-button>
          <el-button type="primary" @click="bujiaadd">确 定</el-button>
        </div>
      </el-dialog>
  
      <!-- 退款 -->
      <el-dialog
        width="60%"
        title="退款"
        :destroy-on-close="true"
        :close-on-click-modal="false"
        :visible.sync="tuikuanloding"
      >
        <el-table height="400px" :data="tuikuanlist">
          <el-table-column
            property="refundUser"
            label="退款人"
            width=""
          ></el-table-column>
          <el-table-column
            property="reason"
            label="退款原因"
            width=""
          ></el-table-column>
          <el-table-column
            property="fail"
            label="是否挂科"
            width=""
          ></el-table-column>
          <el-table-column
            property="refundPremium"
            label="是否退保费"
            width=""
          ></el-table-column>
          <el-table-column
            property="refundableMoney"
            label="客户退款金额"
            width=""
          ></el-table-column>
          <el-table-column
            property="actualRefundMoney"
            label="客户实退金额"
            width=""
          ></el-table-column>
          <el-table-column
            property="refundCase"
            label="客户退款情况"
            width=""
          ></el-table-column>
          <el-table-column property="remark" label="客户退款记录" width="">
          </el-table-column>
          <el-table-column
            label="操作"
            align="center"
            width="200"
            class-name="small-padding fixed-width"
          >
            <template slot-scope="scope">
              <el-button @click="xiutui(scope.row)" size="mini" type="text"
                >修改</el-button
              >
              <el-button
                @click="shanlao(scope.row.refundId)"
                size="mini"
                type="text"
                >删除</el-button
              >
            </template>
          </el-table-column>
        </el-table>
        <div slot="footer" class="dialog-footer" style="text-align: center">
          <el-button @click="tuikuanloding = false">取 消</el-button>
          <el-button type="primary" @click="addtuikuan">退款</el-button>
        </div>
      </el-dialog>
  
      <el-dialog
        width="60%"
        title="编辑交稿"
        :destroy-on-close="true"
        :close-on-click-modal="false"
        :visible.sync="jiaogaoloding"
      >
      <el-form
          :model="jiaogaopfrom"
          :rules="ruless"
          ref="ruleForm"
          label-width="180px"
          class="demo-ruleForm"
        >
          <el-form-item prop="workTask" label="专业/科目/工作量">
            <el-input
              v-model="jiaogaopfrom.workTask"
              placeholder="请输入专业/科目/工作量"
            />
          </el-form-item>
          <el-form-item label="分数占比">
            <el-input v-model="jiaogaopfrom.fraction" placeholder="请输入分数占比 " />
          </el-form-item>
          <el-form-item prop="submissionTask" label="老师交稿ddl">
            <el-date-picker
              value-format="yyyy-MM-dd HH:mm:ss"
              v-model="jiaogaopfrom.submissionTask"
              type="datetime"
              placeholder="选择日期时间"
            >
            </el-date-picker>
          </el-form-item>
  
          <el-form-item prop="studentDeadlineTask" label="学生要求交稿ddl">
            <el-date-picker
              value-format="yyyy-MM-dd HH:mm:ss"
              v-model="jiaogaopfrom.studentDeadlineTask"
              type="datetime"
              placeholder="选择日期时间"
            >
            </el-date-picker>
          </el-form-item>
          <el-form-item prop="deadlineTask" label="实际截止ddl/考试时间">
            <el-date-picker
              value-format="yyyy-MM-dd HH:mm:ss"
              v-model="jiaogaopfrom.deadlineTask"
              type="datetime"
              placeholder="选择日期时间"
            >
            </el-date-picker>
          </el-form-item>
  
    
        </el-form>
        <div slot="footer" class="dialog-footer" style="text-align: center">
          <el-button @click="jiaogaoloding = false">取 消</el-button>
          <el-button type="primary" @click="jaiogabi">确认</el-button>
        </div>
      </el-dialog>
      <!-- 老师退款  -->
      <el-dialog
        width="60%"
        title="老师退款"
        :destroy-on-close="true"
        :close-on-click-modal="false"
        :visible.sync="laoshituikuanloding"
      >
        <el-table height="400px" :data="tuikuanlist">
          <el-table-column
            property="refundUser"
            label="退款人"
            width=""
          ></el-table-column>
          <el-table-column
            property="refundableMoney"
            label="老师退款金额"
            width=""
          ></el-table-column>
          <el-table-column
            property="actualRefundMoney"
            label="老师实退金额"
            width=""
          ></el-table-column>
          <el-table-column
            property="refundCase"
            label="老师退款情况"
            width=""
          ></el-table-column>
          <el-table-column
            property="remark"
            label="老师退款记录"
            width=""
          ></el-table-column>
          <el-table-column
            property="collectionChannel"
            label="收款途径"
            width=""
          ></el-table-column>
        <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
            <template slot-scope="scope">
                 <el-button @click="xiutui(scope.row)" size="mini" type="text"
                >修改</el-button
              >
              <el-button @click="shanlao(scope.row.refundId)" size="mini" type="text">删除</el-button>
            </template>
          </el-table-column> 
        </el-table>
        <div slot="footer" class="dialog-footer" style="text-align: center">
          <el-button @click="laoshituikuanloding = false">取 消</el-button>
          <el-button type="primary" @click="addtuikuan">退款</el-button>
        </div>
      </el-dialog>
  
      <!-- 新增退款 -->
      <el-dialog
        @close="tuiqing"
        :title="tuikuantitle"
        :destroy-on-close="true"
        :close-on-click-modal="false"
        :visible.sync="tuikuanfromdoling"
      >
        <el-form
          :model="tuikuanyunfrom"
          :rules="tuikuanyunfromrr"
          ref="tuikuanform"
          label-width="180px"
          class="demo-ruleForm"
        >
          <!-- @blur="bujiaformatAmount('premiumAmount')" -->
          <el-form-item label="退款人">
            <el-select
            disabled
              v-model="tuikuanyunfrom.refundUser"
              placeholder=""
              clearable
              style="width: 240px"
            >
              <el-option
                v-for="dict in chengdan"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item
            v-if="this.tuikuanyunfrom.fromType == 0"
            prop="reason"
            label="退款原因"
          >
            <el-input v-model="tuikuanyunfrom.reason" placeholder="退款原因" />
          </el-form-item>
          <el-form-item
            v-if="this.tuikuanyunfrom.fromType == 0"
            prop="fail"
            label="是否挂科"
          >
            <el-select
              v-model="tuikuanyunfrom.fail"
              placeholder=""
              clearable
              style="width: 240px"
            >
              <el-option
                v-for="dict in [
                  { value: '是', label: '是' },
                  { value: '否', label: '否' },
                ]"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item
            v-if="this.tuikuanyunfrom.fromType == 0"
            prop="refundPremium"
            label="是否退保费"
          >
            <el-select
              v-model="tuikuanyunfrom.refundPremium"
              placeholder=""
              clearable
              style="width: 240px"
            >
              <el-option
                v-for="dict in [
                  { value: '是', label: '是' },
                  { value: '否', label: '否' },
                ]"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item prop="refundableMoney" label="应退金额">
            <el-input
              @blur="tuikuanformatAmount('refundableMoney')"
              v-model="tuikuanyunfrom.refundableMoney"
              placeholder="请输入应退金额"
            />
          </el-form-item>
          <el-form-item prop="actualRefundMoney" label="实退金额">
            <el-input
              @blur="tuikuanformatAmount('actualRefundMoney')"
              v-model="tuikuanyunfrom.actualRefundMoney"
              placeholder="请输入实退金额"
            />
          </el-form-item>
          <el-form-item label="退款情况">
            <el-select
              v-model="tuikuanyunfrom.refundCase"
              placeholder=""
              clearable
              style="width: 240px"
            >
              <el-option
                v-for="dict in tuikuan.fromType == 1
                  ? [
                      { value: '已退', label: '已退' },
                      { value: '未结', label: '未结' },
                      { value: '未退', label: '未退' },
                    ]
                  : [
                      { value: '已退', label: '已退' },
                      { value: '预留', label: '预留' },
                      { value: '客户原因', label: '客户原因' },
                    ]"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="备注">
            <el-input v-model="tuikuanyunfrom.remark" placeholder="请输入备注" />
          </el-form-item>
          <el-form-item v-if="this.tuikuanyunfrom.fromType == 1" label="收款途径">
            <el-input
              v-model="tuikuanyunfrom.collectionChannel"
              placeholder="请输入收款途径"
            />
          </el-form-item>
  
          <!-- <el-form-item label="客诉需求">
            <el-input v-model="kesufrom.appeal" placeholder="请输入客诉需求" />
          </el-form-item> -->
  
          <!-- <el-form-item prop="remark" label="备注">
            <el-input v-model="jiekuanForm.remark" placeholder="" />
          </el-form-item> -->
        </el-form>
        <div slot="footer" class="dialog-footer" style="text-align: center">
          <el-button @click="tuikuanfromdoling = false">取 消</el-button>
          <el-button type="primary" @click="tuikuanadds">确 定</el-button>
        </div>
      </el-dialog>
  
      <!-- 成绩反馈 -->
  
      <!-- 新增退款 -->
      <el-dialog
        @close="tuiqings"
        title="成绩反馈"
        :destroy-on-close="true"
        :close-on-click-modal="false"
        :visible.sync="chengjiloding"
      >
        <el-form
          :model="bendanchengjifrom"
          :rules="tuikuanyunfromrrs"
          ref="fankuiluruform"
          label-width="180px"
          class="demo-ruleForm"
        >
          <!-- @blur="bujiaformatAmount('premiumAmount')" -->
          <el-form-item prop="singleScore" label="本单成绩/总成绩">
            <el-input
              v-model="bendanchengjifrom.singleScore"
              placeholder="本单成绩/总成绩"
            />
          </el-form-item>
          <el-form-item prop="reason" label="是否挂科">
            <el-select
              v-model="bendanchengjifrom.customerFailExam"
              placeholder=""
              clearable
              style="width: 240px"
            >
              <el-option
                v-for="dict in [
                  { value: '1', label: '是' },
                  { value: '0', label: '否' },
                ]"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item label="保分状态">
            <el-select
              v-model="bendanchengjifrom.guaranteeStatus"
              placeholder=""
              clearable
              style="width: 240px"
            >
              <el-option
                v-for="dict in [
                  { value: '保分成功', label: '保分成功' },
                  { value: '差距10%以内', label: '差距10%以内' },
                  { value: '10-20%', label: '10-20%' },
                  { value: '超过20%', label: '超过20%' },
                  { value: '无保分', label: '无保分' },
                ]"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer" style="text-align: center">
          <el-button @click="chengjiloding = false">取 消</el-button>
          <el-button type="primary" @click="luruti">确 定</el-button>
        </div>
      </el-dialog>
  
  
  
      <el-dialog
    title="问卷"
    :visible.sync="dialogVisiblesd"
    width="30%"
    >
  问卷地址：{{ erweim.url }}  
  <el-button type="primary" size="mini" @click="
  fsfuzhu(erweim.url)">复制</el-button>
  
  <br>
  
  <!-- <p style="padding: 0;margin: 0;
  height: 40px;line-height: 40px;">二维码：</p> -->
  <img :src="erweim.fileUrl" alt="">
    <span slot="footer" class="dialog-footer">
      <el-button @click="dialogVisiblesd = false">取 消</el-button>
      <el-button type="primary" @click="dialogVisiblesd = false">确 定</el-button>
    </span>
  </el-dialog>
  
  <!-- 得分 -->
  <el-dialog
    title="得分情况"
    :visible.sync="defenloding"
    width="30%"
    >
   <h3>老师评价</h3>
   <p>内容满意度:{{defenData.teacherContentSatisfaction}}分</p>
   <p>服务满意度:{{defenData.teacherServiceSatisfaction}}分</p>
   <p>时效满意度:{{defenData.teacherPrescriptionSatisfaction}}分</p>
   <p>是否愿意继续选择该老师:
    <span v-show="defenData.teacherSelectAgain==0">
    坚决不</span>
    <span v-show="defenData.teacherSelectAgain==8">
    无所谓</span>
    <span v-show="defenData.teacherSelectAgain==10">
    非常乐意</span>
   </p>
   <p>对老师的意见或建议:{{defenData.teacherSuggestion}}</p>
  <br />
   <h3>客服评价</h3>
   <p>客服服务满意度:{{defenData.serviceEvaluate}}分</p>
   <p>客服时效满意度:{{defenData.servicePrescriptionSatisfaction}}分</p>
  
   <p>是否愿意继续选择我们为您服务:
    <span v-show="defenData.selectServiceAgain==0">
    坚决不</span>
    <span v-show="defenData.selectServiceAgain==8">
    无所谓</span>
    <span v-show="defenData.selectServiceAgain==10">
    非常乐意</span>
   </p>
   <p>客服意见或建议:{{defenData.serviceSuggestion}}</p>
  
    <span slot="footer" class="dialog-footer">
      <el-button @click="defenloding = false">取 消</el-button>
      <el-button type="primary" @click="defenloding = false">确 定</el-button>
    </span>
  </el-dialog>
    </div>
  </template>
  
  <script>
  import { listUser,listUssder } from "@/api/system/user";
  import draggable from "vuedraggable";
  import Sortable from "sortablejs";
  import ElTableDraggable from "el-table-draggable";
  import {
    addrenwuj,
    addre,
    uplist,
    addkesus,
    dinglist,
    deletelist,
    deleterenw,
    jiaogao,
    laoshijiekuan,
    xiujiekuansa,
    getjiekuan,
    xinzengshoukuans,
    shoukuanlist,
    deleteGetjiekuan,
    shanshoukan,
    chulikesu,
    bujiajilu,
    fankuorew,
    bujiajiluadd,
    xiubu,
    wenjuanadd,
    bianjixundan,
    tuikuanlist,
    tuikuanadd,
    xiugaituikuan,
    daochu,
    lurufankui,
    deletelao,
    deletebu,
    jiaohuan,
    xissubu,chijiao
  } from "@/api/new";
  
  export default {
    components: {
      draggable,
      ElTableDraggable,
      // ...其他组件
    },
    name: "Role",
    dicts: ["sys_normal_disable"],
    data() {
      return {
        yttw:false,
        tableH:370,
      jiaogaoloding:false,
      jiaogaopfrom: {
               "taskId": '',
              "orderId": '',
              "workTask": "",
              "submissionTask": "",
              "studentDeadlineTask": "",
              "deadlineTask": "",
              "submitStatus": 0,
              "deliveryDate": null,
              "taskStatus": "",
              fraction:''
          },
  
        erweim:{},
        defenData:{},
        dialogVisiblesd:false,
        defenloding:false,
        fromType: "",
        bujiatitle: "补价",
        bujiakong: false,
        bujiadolog: false,
        bujiadata: [],
        bendanchengjifrom: {
          orderId: "",
          customerFailExam: "",
          singleScore: "",
          guaranteeStatus: "",
        },
        fankuifromrule: {
          orderStatus: [{ required: true, message: "不能为空", trigger: "blur" }],
        },
        bujiafrom: { premiumAmount: null, orderId: null },
        bujiaomre: {
          premiumAmount: [
            { required: true, message: "补价金额不能为空", trigger: "blur" },
          ],
        },
        fank: [
          { value: "2", label: "反馈" },
          { value: "3", label: "重要反馈" },
        ],
        fankuodata: {},
        fankuidiong: false,
        wanjiekopng: false,
        kesufrom: {
          orderId: "",
          orderNumber: "",
          submitTime: "",
          notekeeper: "",
          customerNickname: "",
          info: "",
          transactionPrice: "",
          billReceivable: "",
          teacher: "",
          reason: "",
          appeal: "",
          academicOpinion: "",
          auditorOpinion: "",
          handler: "",
          disposeStatus: "",
          disposeResult: "",
          handleTime: "",
        },
        kesuwanfrom: {
          orderId: "",
          disposeResult: "",
        },
        kesuwanfromre: {
          disposeResult: [
            { required: true, message: "处理结果不能为空", trigger: "blur" },
          ],
        },
        kesufromkong: false,
        kesufromkonga: false,
        rekesugfro: {
          reason: [
            { required: true, message: "客诉原因不能为空", trigger: "blur" },
          ],
        },
        laoshituikuanloding: false,
        tuikuanfromdoling: false,
        tuikuanloding: false,
        tuikuanyunfrom: {
          remark: "",
          orderId: "",
          refundUser:this.$store.state.user.name,
          reason: "",
          fail: "",
          refundPremium: "",
          refundableMoney: "",
          actualRefundMoney: "",
          refundCase: "",
          collectionChannel: "",
          fromType: "",
        },
        tuikuanyunfromrrs: {
          singleScore: [
            { required: true, message: "成绩不能为空", trigger: "blur" },
          ],
          actualRefundMoney: [
            { required: true, message: "实退金额不能为空", trigger: "blur" },
          ],
        },
        tuikuanyunfromrr: {
          refundableMoney: [
            { required: true, message: "应退金额不能为空", trigger: "blur" },
          ],
          actualRefundMoney: [
            { required: true, message: "实退金额不能为空", trigger: "blur" },
          ],
        },
        rgrfghr:[],
        tuikuan: {
          pageNo: 1,
          pageSize: 1000,
          fromType: 0,
          orderId: "",
        },
        tableHeight:0,
        tuikuanlist: [],
        shoukuantab: [],
        shoukuankong: false,
        shoukuanloding: false,
        jiekuanloding: false,
        laoshikong: false,
        shoukanfrom: {
          remark: "",
          orderId: "",
          amountCollected: "",
          paymentTerm: "",
          serviceCharge: "",
        },
        jiekuanForm: {
          remark: "",
          orderId: "",
          recordId: "",
          paymentAmount: "",
          collectionChannel: "",
        },
        reshoukanfrom: {
          amountCollected: [
            { required: true, message: "收款金额不能为空", trigger: "blur" },
          ],
        },
        rulejiekuanForm: {
          paymentAmount: [
            { required: true, message: "结款金额不能为空", trigger: "blur" },
          ],
        },
        ruleForm: {
          orderId: "",
          workTask: "",
          submissionTask: "",
          studentDeadlineTask: "",
          deadlineTask: "",
          submitStatus: "",
          deliveryDate: null,
          taskStatus: "",
        },
        ruless: {
          workTask: [
            { required: true, message: "任务内容不能为空", trigger: "blur" },
          ],
          submissionTask: [
            { required: true, message: "老师交稿ddl不能为空", trigger: "blur" },
          ],
          studentDeadlineTask: [
            {
              required: true,
              message: "学生要求交稿ddl不能为空",
              trigger: "blur",
            },
          ],
          deadlineTask: [
            {
              required: true,
              message: "实际截止ddl不能为空",
              trigger: "blur",
            },
          ],
        },
  
        // 遮罩层
        loading: true,
        // 选中数组
        ids: [],
        // 非单个禁用
        single: true,
        // 非多个禁用
        multiple: true,
        // 显示搜索条件
        showSearch: true,
        // 总条数
        total: 0,
        // 角色表格数据
        roleList: [],
        // 弹出层标题
        title: "",
        // 是否显示弹出层
        open: false,
        // 是否显示弹出层（数据权限）
        chengjiloding: false,
        // 日期范围
        dateRange: [],
        // 数据范围选项
  
        // 菜单列表
        menuOptions: [],
        // 部门列表
        deptOptions: [],
        // 查询参数
        jiekuantitle: "结款",
        queryParams: {
          pageNo: 1,
          refundState:1,
          pageSize: 10,
          guarantee: null,
          delFlag: 0,
          keyword: "",
          country: "",
          sortField: "",
          settlementStatus: "",
          orderingRule: "",
          orderStatus: null,
          customerFailExam:'',
          customerRefundState: null,
          teacherRefundState: null,
          complaintStatus: null,
          importantOrder: null,
          directSelect: null,
          balanceStatus: null,
        },
        renwuleixing: [
          { value: "辅导", label: "辅导" },
          { value: "考试", label: "考试" },
          { value: "作业", label: "作业" },
          { value: "包课", label: "包课" },
          { value: "写作", label: "写作" },
        ],
        xuandang: [
          { value: "低档", label: "低档" },
          { value: "中档", label: "中档" },
          { value: "高档", label: "高档" },
        ],
        jiaogao: [
          { value: "0", label: "否" },
          { value: "1", label: "是" },
        ],
        jieduan: [
          { value: "高中", label: "高中" },
          { value: "本科", label: "本科" },
          { value: "硕士", label: "硕士" },
          { value: "博士", label: "博士" },
          { value: "其他", label: "其他" },
        ],
        chengdan: [
          {
            value: this.$store.state.user.name,
            label: this.$store.state.user.name,
          },
        ],
        renwuloding: false,
        // 表单参数
        lstform: {
          fraction: "",
          followNumber:null,
         phase: null,
          remark: null,
          orderNumber: "",
          userId: this.$store.state.user.id,
          customerNickname: "",
          account: "",
          taskType: "",
          country: "",
          school: "",
          workTask: "",
          submissionTask: "",
          studentDeadlineTask: null,
          deadlineTask: null,
          submitStatus: null,
          directSelect: null,
          amountReceived: null,
          outstandingAmount: null,
          supplementaryValency: null,
          parcelInsurance: null,
          guarantee: null,
          transactionPrice: null,
          billReceivable: null,
          officialReceipts: null,
          collectionSituation: null,
          remainingSum: null,
          remainingSumRemark: null,
          orderService: this.$store.state.user.name,
          drainageService: null,
          customerAttribute: null,
          failRate: null,
          timelinessRatio: null,
          teacherName: null,
          edu:null,
          teacherBasicCompensation: null,
          teacherGuarantee: null,
          teacherPremium: null,
          teacherSupplementaryValency: null,
          teacherTotalPrice: null,
          teacherRemark: null,
          settlementRecord: null,
          settlementStatus: null,
          teacherAchievement: null,
          teacherPostponeStatus: null,
          customerRefundReason: null,
          customerFailExam: null,
          customerReturnPremiumStatus: null,
          customerRefundAmount: null,
          customerRefundableAmount: null,
          customerRefundStatus: null,
          customerRefundRecord: null,
          customerRemark: null,
          teacherRefundAmount: null,
          teacherActualRefundAmount: null,
          teacherRefundStatus: null,
          teacherRefundRecord: null,
          singleScore: null,
          singleEvaluation: null,
          questionnaireStatus: null,
          refundTime: null,
          updateStatus: null,
          orderStatus: null,
          complaintStatus: null,
          orderTaskList: [
            {
              workTask: "",
              submissionTask: "",
              studentDeadlineTask: "",
              deadlineTask: "",
              submitStatus: "",
              deliveryDate: null,
              taskStatus: "",
            },
          ],
        },
  
        form: {},
        shouxu: [
          { value: "是", label: "是" },
          { value: "否", label: "否" },
        ],
        scountry: [
        { value: "中国大陆", label: "中国大陆" },
        { value: "美国", label: "美国" },
          { value: "英国", label: "英国" },
          { value: "加拿大", label: "加拿大" },
          { value: "澳大利亚", label: "澳大利亚" },
          { value: "香港", label: "香港" },
          { value: "澳门", label: "澳门" },
          { value: "新西兰", label: "新西兰" },
          { value: "新加坡", label: "新加坡" },
          { value: "马来西亚", label: "马来西亚" },
          { value: "欧洲其他国家", label: "欧洲其他国家" },
          { value: "亚洲其他国家", label: "亚洲其他国家" },
          { value: "未知", label: "未知" },
        ],
        jiegridData: [],
  
  dfada:false,
        jiaofankuifrom: {
               "taskId": '',
              "orderId": '',
              "workTask": "",
              "submissionTask": "",
              "studentDeadlineTask": "",
              "deadlineTask": "",
              "submitStatus": "",
              "deliveryDate": null,
              "taskStatus":null
          },
          jiaofankuifromre:{
            orderStatus: [
            { required: true, message: "不能为空", trigger: "blur" },
          ]
          },
  
        shibie: "",
         defaultProps: {
          children: "children",
          label: "label",
        },
        bujiatitle: "补价",
        tuikuantitle: "退款",
        // 表单校验
        rules: {
          customerAttribute: [
            { required: true, message: "客户属性不能为空", trigger: "blur" },
          ],
          drainageService: [
            { required: true, message: "引流客服不能为空", trigger: "blur" },
          ],
          orderService: [
            { required: true, message: "成单客服不能为空", trigger: "blur" },
          ],
          billReceivable: [
            { required: true, message: "应收不能为空", trigger: "blur" },
          ],
          officialReceipts: [
            { required: true, message: "实收不能为空", trigger: "blur" },
          ],
          transactionPrice: [
            { required: true, message: "成交价不能为空", trigger: "blur" },
          ],
          outstandingAmount: [
            { required: true, message: "未收款金额不能为空", trigger: "blur" },
          ],
          amountReceived: [
            { required: true, message: "已收款金额不能为空", trigger: "blur" },
          ],
          directSelect: [
            { required: true, message: "选档不能为空", trigger: "blur" },
          ],
          taskType: [
            { required: true, message: "任务类型不能为空", trigger: "blur" },
          ],
          customerNickname: [
            { required: true, message: "客户昵称不能为空", trigger: "blur" },
          ],
          orderNumber: [
            { required: true, message: "订单号不能为空", trigger: "blur" },
          ],
          country: [
            { required: true, message: "国家（地区）不能为空", trigger: "blur" },
          ],
          roleSort: [
            { required: true, message: "角色顺序不能为空", trigger: "blur" },
          ],
        },
        se: "",
        user: this.$store.state.user.name,
        sese: [],
      };
    },
    created() {
      this.getList();
      this.getTableHeight();
    },
  
    watch: {
      // 每当 question 改变时，这个函数就会执行
      showSearch(newQuestion, oldQuestion) {
  
  if(!this.showSearch){
    this.tableH=210
    this.getTableHeight();
  }else{
    setTimeout(() => {
      this.tableH = document.querySelector(".dfdsfsd").offsetHeight+220; 
      this.getTableHeight();
    }, 10);
  }
        // 
      }
    },
    mounted() {
      this.tableH = document.querySelector(".dfdsfsd").offsetHeight+220; 
   //挂载window.onresize事件(动态设置table高度)
   let _this = this;
      window.onresize = () => {
        if (_this.resizeFlag) {
          clearTimeout(_this.resizeFlag);
        }
        _this.resizeFlag = setTimeout(() => {
          _this.getTableHeight();
          _this.resizeFlag = null;
        }, 100);
      };
  
  
      this.$nextTick(() => {
        // 需要支持拖动效果的列表容器，在这里我们设置为el-table组件的tbody，
        // 注意：最前面的一段为前面el-table的class: draggable-table，主要为了防止如果页面有多个table，多个table同时实现拖拽效果
        // 当然，如果多个table都需要拖拽效果，选择器中最前面的.draggable-table可以去除。
        const tbody = document.querySelector(
          ".no-hover .el-table__body-wrapper tbody"
        );
        new Sortable(tbody, {
          animation: 150,
          filter: '.cell',
          preventOnFilter: false,
  
          // 需要在odEnd方法中处理原始eltable数据，使原始数据与显示数据保持顺序一致
          onEnd: ({ newIndex, oldIndex }) => {
            console.log(newIndex, oldIndex);
            const targetRow = this.roleList[oldIndex];
            const targetRowNew = this.roleList[newIndex];
            console.log(targetRow, targetRowNew);
            this.roleList.splice(oldIndex, 1);
            this.roleList.splice(newIndex, 0, targetRow);
  
            jiaohuan({
              orderId: targetRowNew.orderId,
              sourceOrderId: targetRow.orderId,
            }).then(() => {
              this.getList();
            });
          },
        });
      });
    },
  
    methods: {
      getTableHeight() {
         
        let tableHeightDetil = window.innerHeight - this.tableH;
        if (tableHeightDetil <= 300) {
          this.tableHeight = 300;
        } else {
          this.tableHeight = window.innerHeight - this.tableH;
        }
      },
      vkhf(){
  
      this.yttw=!this.yttw
  setInterval(()=>{
    this.tableH=210
    this.getTableHeight()})
      },
      paixu(e, d) {
        let xu = "";
        if (e.order == "descending") xu = "desc";
        if (e.order == "ascending") xu = "asc";
        let a = e.prop.replace(/([A-Z])/g, "_$1").toLowerCase();
  
        this.queryParams.sortField = a;
        this.queryParams.orderingRule = xu;
        this.getList();
      },
  
      danyuange({ row, column, rowIndex, columnIndex }) {
        if (columnIndex == 1) {
          if (
            !(
              row.orderTaskList.length &&
              row.orderTaskList.every(
                (item) => !item.submitStatus && item.submitStatus !== "0"
              )
            ) &&
            row.transactionPrice > 5000
          ) {
            return "qianlan";
          }
        }
         if (columnIndex == 2) {
          if (row.orderStatus == 3) {
            return "sqianhuang";
          } else if (row.orderStatus == 2) {
            return "qianhuang";
          }
        }
  
      },
      tableRowClassNames(data, rowIndex) {
        let a = this.xun(data, rowIndex);
        //  this.sese.push(a)
        return a;
      },
      rowStyle() {
        return {
          backgroundColor: "transparent !important",
        };
      },
      tableRowClassName({ row, rowIndex }) {
        let a = this.xun(row, rowIndex);
  
        return a;
      },
  
      xun(row, rowIndex) {
        // 学生退。老师未退
        if (
          row.customerRefundAmount !== null &&
          row.customerRefundAmount !== "0.00" &&
          (row.teacherRefundAmount == null || row.teacherRefundAmount == "0.00")
        ) {
          return "shenhui";
        }
        // 学生老师均退款
        else if (
          row.customerRefundAmount !== null &&
          row.customerRefundAmount !== "0.00" &&
          row.teacherRefundAmount !== null &&
          row.teacherRefundAmount !== "0.00"
        ) {
          return "qianhui";
        }
        // 未收全款
        // row.billReceivable != null &&
        //   row.billReceivable != "0.00" &&
        //   row.officialReceipts != null &&
        //   row.officialReceipts != "0.00" &&
        //   row.billReceivable !== row.officialReceipts
        else if (row.outstandingAmount !== 0.0) {
          return "shenhong";
        } // 未完结，但已收全款
        else if (
          !(
            row.orderTaskList.length &&
            row.orderTaskList.every(
              (item) => item.submitStatus && item.submitStatus != "0"
            )
          ) &
          (row.outstandingAmount == 0.0)
        ) {
          return "qianhong";
        } else if (
          !(
            row.orderTaskList.length &&
            row.orderTaskList.every(
              (item) => item.submitStatus && item.submitStatus != "0"
            )
          ) &&
          row.billReceivable != null &&
          row.billReceivable != "0.00" &&
          row.officialReceipts != null &&
          row.officialReceipts != "0.00" &&
          row.billReceivable == row.officialReceipts
        ) {
          return "qianfen";
        }
        // 已完结
        else if (
          row.orderTaskList.length &&
          row.orderTaskList.every(
            (item) => item.submitStatus && item.submitStatus != "0"
          )
        ) {
          return "qianlv";
        }
  
        // //反馈
        // else if (row.orderStatus == 3) {
        //   return "yellow";
        // }
        return "";
      },
      shanbu(row) {
        this.$modal
          .confirm("是否确认删除此数据项？")
          .then(() => {
            deletebu(row).then(() => {
              this.getbujia();
              this.$modal.msgSuccess("删除成功");
            });
          })
  
          .catch(() => {});
      },
      shanlao(row) {
        this.$modal
          .confirm("是否确认删除此数据项？")
          .then(() => {
            deletelao(row).then(() => {
              this.gettuikuan();
              this.$modal.msgSuccess("删除成功");
            });
          })
  
          .catch(() => {});
      },
      generateQRCode() {
        if (this.qrcode != null) {
          this.qrcode.clear(); // 清除原来的二维码
        }
        this.qrcode = new QRCode(this.$refs.qrcode, {
          width: 256,
          height: 256,
          text: "{url:'wifiConfiguration',id:132323}",
        });
      },
  
      getsList() {
        this.loading = true;
        listUser().then((response) => {
          this.chengdan = [
            {
              value: this.$store.state.user.name,
              label: this.$store.state.user.name,
            },
          ];
          response.rows.forEach((item, index) => {
            if (index !== 0) {
              this.chengdan.push({
                value: item.userName,
                label: item.userName,
              });
            }
            this.loading = false;
          });
        });
      },
  
      removerenwu(index) {
        this.lstform.orderTaskList.splice(index, 1);
      },
      addrenwu() {
        this.lstform.orderTaskList.push({
          workTask: "",
          followNumber:null,
          submissionTask: "",
          studentDeadlineTask: "",
          deadlineTask: "",
          submitStatus: "",
          deliveryDate: null,
          taskStatus: "",
        });
      },
  
      shanshoukan(row) {
        this.$modal
          .confirm("是否确认删除此数据项？")
          .then(() => {
            shanshoukan(row.recordId).then(() => {
              this.getshoukuanlist();
              this.$modal.msgSuccess("删除成功");
            });
          })
  
          .catch(() => {});
      },
      lshoukankuangbuujuia(row) {
        this.fromType = 1;
        this.bujiakong = true;
        this.bujiafrom.orderId = row.orderId;
        this.getbujia(row);
      },
      shoukankuangbuujuia(row) {
        this.fromType = 0;
        this.bujiakong = true;
        this.bujiafrom.orderId = row.orderId;
        this.getbujia(row);
      },
      shoukankuang(row) {
        this.shoukanfrom.orderId = row.orderId;
        this.getshoukuanlist();
      },
      xinzengshoukuan() {
        this.shoukuankong = true;
      },
      bujiakongs() {
        this.bujiadolog = true;
        this.bujiatitle = "新增补价";
      },
      bujiakonsgs(row) {
        this.bujiadolog = true;
        this.bujiatitle = "修改补价";
        this.bujiafrom = row;
      },
      addtuikuan() {
        this.tuikuantitle = "退款";
        this.tuikuanfromdoling = true;
      },
      xiutui(row) {
        this.tuikuantitle = "修改退款";
        this.tuikuanyunfrom = row;
        this.tuikuanfromdoling = true;
      },
      getshoukuanlist() {
        shoukuanlist({
          pageNo: 1,
          pageSize: 1000,
          orderId: this.shoukanfrom.orderId,
        }).then((res) => {
          this.shoukuanloding = true;
          this.shoukuantab = res.rows;
        });
      },
      defen(row){
        this.defenloding=true
        this.defenData=row.orderEvaluate
      },
      getjiekuans(row) {
        this.jiekuanForm.orderId = row.orderId;
        this.getlisd();
      },
  
      getlisd() {
        getjiekuan({
          pageNo: 1,
          pageSize: 1000,
          orderId: this.jiekuanForm.orderId,
        }).then((res) => {
          this.jiegridData = res.rows;
          this.jiekuanloding = true;
        });
      },
      addshoukuan() {
        this.$refs["shoukanfrom"].validate((valid) => {
          if (valid) {
            xinzengshoukuans(this.shoukanfrom).then((res) => {
              this.shoukuantab = res.rows;
              this.getshoukuanlist();
              this.getList();
              this.shoukuankong = false;
            });
          }
        });
      },
      addjiekuans() {
        this.$refs["fankuiForm"].validate((valid) => {
          if (valid) {
            this.fankuodata.orderStatus;
  
            this.fankuodata.orderTaskList.forEach((item, index) => {
              this.fankuodata.orderTaskList[index].submitStatus = 0;
            });
            console.log(this.fankuodata.orderTaskList);
            fankuorew(this.fankuodata).then(() => {
              this.fankuidiong = false;
              this.getList();
            });
          }
        });
      },
  
      addjiekuan() {
        this.$refs["jiekuanForm"].validate((valid) => {
          if (valid) {
            if (this.jiekuantitle == "新增结款") {
              this.jiekuanForm.recordId=''
              laoshijiekuan(this.jiekuanForm).then(() => {
                this.laoshikong = false;
                this.getlisd();
                this.$modal.msgSuccess("新增成功");
                this.getList();
              });
            }
            if (this.jiekuantitle == "修改结款") {
              xiujiekuansa(this.jiekuanForm).then(() => {
                this.laoshikong = false;
                this.getlisd();
                this.$modal.msgSuccess("修改成功");
                this.getList();
              });
            }
          }
        });
      },
  
      shouAmount(arr) {
        // 将输入的金额转换为数字
        let amount = parseFloat(this.shoukanfrom[arr]);
        if (!isNaN(amount)) {
          // 保留两位小数并四舍五入
          this.shoukanfrom[arr] = (Math.round(amount * 100) / 100).toFixed(2);
        } else {
          // 如果输入无效，清空输入框
          this.shoukanfrom[arr] = "";
        }
      },
      jieAmount(arr) {
        // 将输入的金额转换为数字
        let amount = parseFloat(this.jiekuanForm[arr]);
        if (!isNaN(amount)) {
          // 保留两位小数并四舍五入
          this.jiekuanForm[arr] = (Math.round(amount * 100) / 100).toFixed(2);
        } else {
          // 如果输入无效，清空输入框
          this.jiekuanForm[arr] = "";
        }
      },
      tuikuanformatAmount(arr) {
        // 将输入的金额转换为数字
        let amount = parseFloat(this.tuikuanyunfrom[arr]);
        if (!isNaN(amount)) {
          // 保留两位小数并四舍五入
          this.tuikuanyunfrom[arr] = (Math.round(amount * 100) / 100).toFixed(2);
        } else {
          // 如果输入无效，清空输入框
          this.tuikuanyunfrom[arr] = "";
        }
      },
      bujiaformatAmount(arr) {
        // 将输入的金额转换为数字
        let amount = parseFloat(this.bujiafrom[arr]);
        if (!isNaN(amount)) {
          // 保留两位小数并四舍五入
          this.bujiafrom[arr] = (Math.round(amount * 100) / 100).toFixed(2);
        } else {
          // 如果输入无效，清空输入框
          this.bujiafrom[arr] = "";
        }
      },
      formatAmount(arr) {
        // 将输入的金额转换为数字
        let amount = parseFloat(this.lstform[arr]);
        if (!isNaN(amount)) {
          // 保留两位小数并四舍五入
          this.lstform[arr] = (Math.round(amount * 100) / 100).toFixed(2);
        } else {
          // 如果输入无效，清空输入框
          this.lstform[arr] = "";
        }
      },
      arraySpanMethod({ row, column, rowIndex, columnIndex }) {
    let num = [10, 11, 12, 13, 14];
    let sss = [44, 45, 46, 47, 48, 49,50];
    let ssss = [52, 53, 54,55];
  
    if (true) {
      if (columnIndex === 9) {
        return [1, 6];
      } else if (num.includes(columnIndex)) {
        return [0, 0];
      }
  
      if (columnIndex === 43) {
        return [1, 8];
      } else if (sss.includes(columnIndex)) {
        return [0, 0];
      }
      if (columnIndex === 51) {
        return [1, 5];
      } else if (ssss.includes(columnIndex)) {
        return [0, 0];
      }
    }
  },
      /** 查询角色列表 */
      getList() {
        this.loading = true;
        dinglist(this.addDateRange(this.queryParams, this.dateRange)).then(
          (response) => {
            // this.roleList =
            this.roleList = response.rows;
            console.log(response);
            this.total = response.total;
            this.loading = false;
          }
        );
      },
  
      parseInput(text) {
        const lines = text.split("\n");
  console.log(lines);
        let kong = true;
        let dadd = { orderTaskList: [] };
        lines.forEach((item, index) => {
          let adff = [];
  
          if (item.includes(":")) {
            adff = item.split(":");
          }
          if (item.includes("：")) {
            adff = item.split("：");
          }
          if (adff[0]) {
            dadd[adff[0]] = adff[1];
          } else {
            let indexs = index + 1;
            kong = true;
            let xin = {};
            // lines.indexOf(item, indexs)
            while (kong) {
  
              if (lines[indexs]) {
    let vvb 
                if (lines[indexs].includes(":")) {
            vvb = lines[indexs].split(":");
          }
          if (lines[indexs].includes("：")) {
            vvb = lines[indexs].split("：");
          }
                if (vvb[0]) {
                  // xin[vvb[0]] = vvb[1];
                  if (vvb[0].includes("时间")) {
                    xin[vvb[0]] = this.formatDate(vvb[1]);
                  } else {
                    xin[vvb[0]] = vvb[1];
                  }
  
                  indexs++;
                } else {
                  kong = false;
                }
              } else {
                kong = false;
              }
            }
            dadd.orderTaskList.push(xin);
          }
        });
        return dadd;
      },
      formatDate(dateStr) {
        if (!dateStr) return;
        const currentYear = new Date().getFullYear();
        let formattedDate;
  
        if (dateStr.includes("/")) {
          // 日期格式: MMDD/HH:mm-SS:mm
          const [datePart, timePart] = dateStr.split("/");
          const [hourPart, minutePart] = timePart
            ? timePart.split("-")
            : ["23:59", "00"];
          const monthDay = datePart;
          const time = timePart ? timePart : "23:59:00"; // 默认时间为23:59:00
  
          formattedDate = `${currentYear}-${monthDay.slice(
            0,
            2
          )}-${monthDay.slice(2, 4)} ${hourPart || "23:59"}:00`;
        } else {
          // 只包含日期的情况
          formattedDate = `${currentYear}-${dateStr.slice(0, 2)}-${dateStr.slice(
            2,
            4
          )} 23:59:00`;
        }
  
        return formattedDate;
      },
      shibiekaishifan() {
        this.lstform;
  
        let dao = `
  【新订单】：${this.lstform.orderNumber}
  任务类型：${this.lstform.taskType}
  国家：${this.lstform.country}
  学校：${this.lstform.school}
  阶段：${this.lstform.phase}
  专业/科目代码及名称:${
          this.lstform.orderTaskList[0]
            ? this.lstform.orderTaskList[0].workTask.split("任务及工作量：")[0]
            : ""
        }
  `  ;
  
  
        this.lstform.orderTaskList.forEach((item, index) => {
          let text = `
  任务${index + 1}:
  任务及工作量:${item.workTask.split("任务及工作量")[1]}
  分数占比：${item.fraction}
  老师交稿/考试时间：${
            item.submissionTask ? this.formatDateTimessd(item.submissionTask) : ""
          }`;
          dao = `
          ${dao}
          ${text}
          `;
        });
  
  
        dao =`
  ${dao}
  客户额外备注：
  `
        //       客户要求时间：0816
        // 最终截止时间：0816/01:00-03:00
        this.lstform.orderTaskList.forEach((item, index) => {
          let text = `
  任务${index + 1}:
  客户要求时间:${
            item.studentDeadlineTask
              ? this.formatDateTimessd(item.studentDeadlineTask)
              : ""
          }
  最终截止时间：${
            item.deadlineTask ? this.formatDateTimessd(item.deadlineTask) : ""
          }
  `;
          dao = `
          ${dao}
          ${text}`;
        });
        dao = `
          ${dao}
  已收款金额：${this.lstform.amountReceived}
  未收款金额：${this.lstform.outstandingAmount}
  成交价：${this.lstform.transactionPrice}
  本单应收：${this.lstform.billReceivable}
  本单实收：${this.lstform.officialReceipts}
  收费途径：
  储值剩余：${this.lstform.remainingSum}
  保费：${this.lstform.parcelInsurance}
  保分/保费：${this.lstform.guarantee}
  档位：${this.lstform.directSelect}
  引流销售：${this.lstform.drainageService}
  客户属性：${this.lstform.customerAttribute}
  客户昵称：${this.lstform.customerNickname}
  询单单号：${this.lstform.followNumber}`
       
        var textArea = document.createElement("textarea");
  
        // 设置textarea的值为需要复制的文本
        textArea.value = dao;
  
        // 将textarea添加到文档中（这一步是必需的，因为execCommand()只能作用于DOM元素）
        document.body.appendChild(textArea);
  
        // 选择textarea中的文本
        textArea.focus();
        textArea.select();
  
        try {
          // 复制文本到剪贴板
          var successful = document.execCommand("copy");
          var msg = successful ? "successful" : "unsuccessful";
          this.$modal.msgSuccess("复制成功");
        } catch (err) {
          console.error("Oops, unable to copy", err);
        }
  
        // 移除textarea元素
        document.body.removeChild(textArea);
      },
  
      fsfuzhu(e){
        var textArea = document.createElement("textarea");
  
        // 设置textarea的值为需要复制的文本
        textArea.value = e;
  
        // 将textarea添加到文档中（这一步是必需的，因为execCommand()只能作用于DOM元素）
        document.body.appendChild(textArea);
  
        // 选择textarea中的文本
        textArea.focus();
        textArea.select();
  
        try {
          // 复制文本到剪贴板
          var successful = document.execCommand("copy");
          var msg = successful ? "successful" : "unsuccessful";
          this.$modal.msgSuccess("复制成功");
        } catch (err) {
          console.error("Oops, unable to copy", err);
        }
  
        // 移除textarea元素
        document.body.removeChild(textArea);
      },
      formatDateTimessd(dateTimeString) {
        // 首先，确保输入的字符串是有效的日期时间格式
        const dateTime = new Date(dateTimeString);
        if (isNaN(dateTime.getTime())) {
          throw new Error("Invalid date time string");
        }
  
        // 获取年月日时分秒
        const year = dateTime.getFullYear();
        const month = String(dateTime.getMonth() + 1).padStart(2, "0"); // 月份是从0开始的，所以要加1
        const day = String(dateTime.getDate()).padStart(2, "0");
        const hours = String(dateTime.getHours()).padStart(2, "0");
        const minutes = String(dateTime.getMinutes()).padStart(2, "0");
  
        // 拼接成所需的格式
        return `${month}${day}/${hours}:${minutes}`;
      },
  
      shibiekaishi() {
    try {
      this.shibie;
        let orderData = {};
  
        if (this.shibie == null) {
          return this.$message.error("输入内容不可为空");
        }
  
        let dabie = this.parseInput(this.shibie);
        console.log(dabie);
        let taskMap = new Map();
        dabie.orderTaskList.forEach((item) => {
          for (let key in item) {
            if (key.startsWith("任务") && key.length < 5) {
              let taskId = key; // 假设任务ID就是属性名
              if (!taskMap.has(taskId)) {
                taskMap.set(taskId, {
                  ...item,
                  "专业/科目代码及名称": dabie["专业/科目代码及名称"],
                });
              } else {
                taskMap.set(taskId, { ...taskMap.get(taskId), ...item });
              }
            }
          }
        });
        console.log(taskMap);
        let index = 0;
        taskMap.forEach((item, task) => {
          let a = {};
          a.workTask = item["专业/科目代码及名称"] +''+(dabie["任务及工作量"]?'任务及工作量：' +dabie["任务及工作量"]:'');
          a.submissionTask = item["老师交稿/考试时间"];
          a.deadlineTask = item["最终截止时间"];
          a.studentDeadlineTask = item["客户要求时间"];
          a.fraction = item["分数占比"];
  
          this.$set(this.lstform.orderTaskList, index, a);
          index = index + 1;
        });
        this.lstform.orderNumber = dabie["【新订单】"];
        this.lstform.customerNickname = dabie["客户昵称"];
        this.lstform.taskType = dabie["任务类型"];
        this.lstform.country = dabie["国家"];
        this.lstform.school = dabie["学校"];
  
        this.lstform.phase = dabie["阶段"];
        this.lstform.directSelect = dabie["档位"];
        this.lstform.amountReceived = dabie["已收款金额"];
        this.lstform.outstandingAmount = dabie["未收款金额"];
        this.lstform.transactionPrice = dabie["成交价"];
        this.lstform.billReceivable = dabie["本单应收"];
        this.lstform.officialReceipts = dabie["本单实收"];
        // this.lstform.officialReceipts = dabie["收费途径"];
        this.lstform.remainingSum = dabie["储值剩余"];
        this.lstform.parcelInsurance = dabie["保费"];
        this.lstform.guarantee = dabie["保分/保费"];
        this.lstform.drainageService = dabie["引流销售"];
        this.lstform.customerAttribute = dabie["客户属性"];
     
      
        this.lstform.followNumber=dabie["询单单号"]
        console.log(this.lstform);
        if (dabie["询单单号"]) {
          bianjixundan({
            remark: null,
            followNumber: dabie["询单单号"],
  
            followStatus: "已成单",
            // "followId": 35
          }).then((res) => {
            this.$modal.msgSuccess("询单状态更新完成");
          });
        }
    } catch (error) {
     alert('格式错误'+error)
    }
        // return orderData;
      },
  
      zhengze(ze) {
        const regex = /^[A|B||C||D|E|F|G|H|I|J|K|T|L|S]\d+$/;
        return regex.test(ze);
      },
      // 取消按钮
      cancel() {
        this.getList();
        this.open = false;
        this.reset();
      },
      guanbijiekuan() {
        this.jiekuanForm.remark=''
        this.jiekuanForm.paymentAmount=''
        this.jiekuanForm.collectionChannel=''
  
        // this.jiekuanForm = {
        //   remark: "",
        //   orderId: "",
        //   paymentAmount: "",
        //   collectionChannel: "",
        // };
      },
      bujiaguasn() {
        this.bujiafrom.premiumAmount = "";
      },
      tuiqings() {
        this.bendanchengjifrom = {
          orderId: "",
          customerFailExam: "",
          singleScore: "",
          guaranteeStatus: "",
        };
      },
      tuiqing() {
        if(  this.tuikuantitle != "修改退款")
        {
          this.tuikuanyunfrom.refundableMoney=''
        this.tuikuanyunfrom.remark=''
        this.tuikuanyunfrom.refundUser=''
        this.tuikuanyunfrom.refundUser=this.$store.state.user.name
        this.tuikuanyunfrom.fail=''
        this.tuikuanyunfrom.refundPremium=''
        this.tuikuanyunfrom.actualRefundMoney=''
        this.tuikuanyunfrom.refundCase='' 
        this.tuikuanyunfrom.collectionChannel=''
        }
        
  
  
     
      },
  
      guanbishoukan() {
        this.shoukanfrom.remark=''
        this.shoukanfrom.amountCollected=''
        this.shoukanfrom.paymentTerm=''
        this.shoukanfrom.serviceCharge=''
  
  
        
      },
      qingko() {
        this.ruleForm = {
          orderId: "",
          workTask: "",
          submissionTask: "",
          studentDeadlineTask: "",
          deadlineTask: "",
          submitStatus: "",
          deliveryDate: null,
          taskStatus: "",
        };
      },
      // 表单重置
      reset() {
        if (this.$refs.menu != undefined) {
        }
  
        this.lstform = {
          remark: null,
          phase: null,
          followNumber:null,
          orderNumber: "",
          userId: this.$store.state.user.id,
          customerNickname: "",
          account: "",
          taskType: "",
          country: "",
          school: "",
          workTask: "",
          submissionTask: "",
          studentDeadlineTask: null,
          deadlineTask: null,
          submitStatus: null,
          directSelect: null,
          balanceStatus: null,
          amountReceived: null,
          outstandingAmount: null,
          supplementaryValency: null,
          parcelInsurance: null,
          guarantee: null,
          transactionPrice: null,
          billReceivable: null,
          officialReceipts: null,
          collectionSituation: null,
          remainingSum: null,
          remainingSumRemark: null,
          orderService: this.$store.state.user.name,
          drainageService: null,
          customerAttribute: null,
          failRate: null,
          timelinessRatio: null,
          teacherName: null,
          edu:null,
          teacherBasicCompensation: null,
          teacherGuarantee: null,
          teacherPremium: null,
          teacherSupplementaryValency: null,
          teacherTotalPrice: null,
          teacherRemark: null,
          settlementRecord: null,
          settlementStatus: null,
          teacherAchievement: null,
          teacherPostponeStatus: null,
          customerRefundReason: null,
          customerFailExam: null,
          customerReturnPremiumStatus: null,
          customerRefundAmount: null,
          customerRefundableAmount: null,
          customerRefundStatus: null,
          customerRefundRecord: null,
          customerRemark: null,
          teacherRefundAmount: null,
          teacherActualRefundAmount: null,
          teacherRefundStatus: null,
          teacherRefundRecord: null,
          singleScore: null,
          singleEvaluation: null,
          questionnaireStatus: null,
          refundTime: null,
          updateStatus: null,
          orderStatus: null,
          complaintStatus: null,
          orderTaskList: [
            {
              workTask: "",
              submissionTask: "",
              studentDeadlineTask: "",
              deadlineTask: "",
              submitStatus: "",
              deliveryDate: null,
              taskStatus: "",
            },
          ],
        };
        this.resetForm("form");
      },
      /** 搜索按钮操作 */
      handleQuery() {
        this.queryParams.pageNum = 1;
        this.getList();
      },
      /** 重置按钮操作 */
      resetQuery() {
        this.queryParams.guarantee = null;
        this.queryParams.delFlag = null;
        this.queryParams.keyword = null;
        this.queryParams.refundState = 1;
        this.queryParams.orderStatus = null;
        
        this.queryParams.customerFailExam = null;
  
        this.queryParams.customerRefundState = null;
        this.queryParams.teacherRefundState = null;
        this.queryParams.complaintStatus = null;
        this.queryParams.importantOrder = null;
        this.queryParams.directSelect = null;
  
        // 查询参数
        //  queryParams: {
        //         pageNo: 1,
        //         pageSize: 10,
        //         guarantee: null,
        //         delFlag: 0,
        //         keyword: "",
        //         orderStatus: null,
        //         customerRefundState: null,
        //         teacherRefundState: null,
        //         complaintStatus: null,
        //         importantOrder: null,
        //         directSelect: null,
        //       },
        this.dateRange = [];
        this.resetForm("queryForm");
        this.handleQuery();
      },
      // 多选框选中数据
      handleSelectionChange(selection) {
        this.ids = selection.map((item) => item.orderId);
        this.single = selection.length != 1;
        this.multiple = !selection.length;
      },
      async jaiogabi (){
        const data=await xissubu(this.jiaogaopfrom)
      console.log(data);
      if(data.code==200){
        this.getList();
        this.jiaogaoloding=false
                  this.$modal.msgSuccess("修改成功");
      }
      },
      baijnidnsdas(){
        xissubu(this.jiaofankuifrom).then((res)=>{
  this.getList()
  this.dfada=false
          this.$modal.msgSuccess("反馈成功");
        })
      },
      handleCommands(command, row, rowess) {
        switch (command) {
          case "jiaogaobianji":
            this.jiaogaoloding=true
            this.jiaogaopfrom=row
            // this.jiaogaopfrom.taskId=row.taskId
  
            // this.jiaogaopfrom.orderId=rowess.orderId
          break;
          case "delete":
            this.$modal
              .confirm("是否确认删除此数据项？")
              .then(function () {
                console.log(row.taskId);
                return deleterenw(row.taskId);
              })
              .then(() => {
                this.getList();
                this.$modal.msgSuccess("删除成功");
              })
              .catch(() => {});
            break;
  
            case 'jiaofankui':
            this.jiaofankuifrom=row
            this.jiaofankuifrom.submitStatus=0
            this.dfada=true
            
            break;
          case "jiaogaoa":
            this.$modal
              .confirm("是否确认交稿？")
              .then(() => {
                // 获取当前时间的时间戳
                const now = new Date().getTime();
                let submissionTask = 0;
                let studentDeadlineTask = 0;
                let deadlineTask = 0;
                let arr = [now];
                // 老师时间
                if (row.submissionTask) {
                  submissionTask = new Date(row.submissionTask).getTime(); // 注意日期格式需要是ISO 8601标准，且我们将其转换为时间戳
  
                  arr.push(submissionTask);
                }
                //学生要求交稿ddl
                if (row.studentDeadlineTask) {
                  studentDeadlineTask = new Date(
                    row.studentDeadlineTask
                  ).getTime();
                  arr.push(studentDeadlineTask);
                }
  
                // 实际截止ddl
                if (row.deadlineTask) {
                  deadlineTask = new Date(row.deadlineTask).getTime();
                  arr.push(deadlineTask);
                }
  
                let a = arr.sort();
                let data = 0;
                if (a[0] == now) {
                  data = 0;
                } else {
                  let num;
                  a.forEach((item, index) => {
                    if (item == now) {
                      num = index - 1;
                    }
                  });
                  a[num];
                  if (a[num] == submissionTask) {
                    data = 1;
                  }
                  if (a[num] == studentDeadlineTask) {
                    data = 2;
                  }
                  if (a[num] == deadlineTask) {
                    data = 3;
                  }
                }
  
                jiaogao({ taskIds: row.taskId, taskStatus: data }).then(() => {
                  // this.lstform.teacherPostponeStatus = data;
                  rowess.teacherPostponeStatus = data;
  
                  rowess.orderTaskList = [];
                  chijiao({orderId:rowess.orderId,postponeStatus:data}).then((response) => {
                    this.open = false;
                    this.getList();
                  });
                  this.$modal.msgSuccess("交稿成功");
                });
                // let newTime =
              })
  
              .catch(() => {});
            break;
          default:
            break;
        }
      },
  
      addkesu(row) {
        this.kesufromkonga = true;
  
        this.kesufrom.notekeeper = this.$store.state.user.name;
        this.kesufrom.orderId = row.orderId;
        this.kesufrom.orderNumber = row.orderNumber;
        this.kesufrom.customerNickname = row.customerNickname;
        this.kesufrom.info = row.orderTaskList[0].workTask;
        this.kesufrom.transactionPrice = row.transactionPrice;
        this.kesufrom.billReceivable = row.billReceivable;
        this.kesufrom.teacher = row.teacherName;
  
        console.log();
      },
      chukesu(row) {
        this.wanjiekopng = true;
        this.kesuwanfrom.handleTime = this.parseTime(new Date());
  
        this.kesuwanfrom.orderId = row.orderId;
      },
  
      getbujia() {
        bujiajilu({
          orderId: this.bujiafrom.orderId,
          fromType: this.fromType,
          pageNo: 1,
          pageSize: 10000,
        }).then((res) => {
          this.bujiadata = res.rows;
          this.getList();
  
        });
      },
  
      bujiaadd() {
        this.$refs["buusjias"].validate((valid) => {
          if (valid) {
            if (this.bujiatitle == "修改补价") {
              xiubu({ ...this.bujiafrom, fromType: this.fromType }).then(() => {
                this.bujiadolog = false;
                this.getbujia();
                this.$modal.msgSuccess("处理成功");
              });
            } else {
              bujiajiluadd({  "orderId": this.bujiafrom.orderId,
      "premiumAmount": this.bujiafrom.premiumAmount, fromType: this.fromType }).then(
                () => {
                  this.bujiadolog = false;
                  this.getbujia();
                  this.$modal.msgSuccess("处理成功");
                }
              );
            }
          }
        });
      },
  
      gettuikuan() {
        this.getsList();
        tuikuanlist(this.tuikuan).then((res) => {
          this.tuikuanlist = res.rows;
        });
      },
      luruti() {
        this.$refs["fankuiluruform"].validate((valid) => {
          if (valid) {
            lurufankui(this.bendanchengjifrom).then(() => {
              this.chengjiloding = false;
              this.getList();
              this.$modal.msgSuccess("处理成功");
            });
          }
        });
      },
      tuikuanadds() {
        this.$refs["tuikuanform"].validate((valid) => {
          if (valid) {
            if ((this.tuikuantitle == "修改退款")) {
              xiugaituikuan(this.tuikuanyunfrom).then(() => {
                this.tuikuanfromdoling = false;
                this.gettuikuan();
                this.getList();
                this.$modal.msgSuccess("修改成功");
              });
            } else {
              tuikuanadd(this.tuikuanyunfrom).then(() => {
                this.tuikuanfromdoling = false;
                this.gettuikuan();
                this.getList();
                this.$modal.msgSuccess("处理成功");
              });
            }
          }
        });
      },
      laotuikan(row) {
        this.laoshituikuanloding = true;
        this.tuikuan.orderId = row.orderId;
        this.tuikuanyunfrom.orderId = row.orderId;
        this.tuikuanyunfrom.fromType = 1;
        this.tuikuan.fromType = 1;
        this.gettuikuan();
      },
      tuikan(row) {
        this.tuikuanloding = true;
        this.tuikuan.orderId = row.orderId;
        this.tuikuanyunfrom.orderId = row.orderId;
        this.tuikuanyunfrom.fromType = 0;
        this.tuikuan.fromType = 0;
        this.gettuikuan();
      },
      // 更多操作触发
      handleCommand(command, row) {
        switch (command) {
          case "wenjuan":
            
          wenjuanadd({orderId:row.orderId}).then((res)=>{
            this.dialogVisiblesd = true;
  
            this.erweim=res.data
  
            })
            break;
          case "chengjifasnkui":
            this.bendanchengjifrom.orderId = row.orderId;
            this.chengjiloding = true;
            break;
          case "laoshituikuan":
            this.tuikuan.orderId = row.orderId;
            this.tuikuanyunfrom.orderId = row.orderId;
            this.tuikuanyunfrom.fromType = 1;
            this.tuikuan.fromType = 1;
            this.gettuikuan();
            this.getsList();
            this.laoshituikuanloding = true;
            break;
          case "tuikuan":
            this.tuikuan.orderId = row.orderId;
            this.tuikuanyunfrom.orderId = row.orderId;
            this.tuikuanyunfrom.fromType = 0;
            this.tuikuan.fromType = 0;
            this.gettuikuan();
            this.getsList();
            this.tuikuanloding = true;
            break;
          case "laoshibujia":
            this.fromType = 1;
            this.bujiatitle = "老师补价";
            this.bujiakong = true;
            this.bujiafrom.orderId = row.orderId;
            this.getbujia(row);
            break;
          case "bujia":
            this.fromType = 0;
            this.bujiatitle = "学生补价";
            this.bujiakong = true;
            this.bujiafrom.orderId = row.orderId;
            this.getbujia(row);
            break;
  
          case "xiugaifankui":
            this.fankuodata = row;
            this.fankuidiong = true;
            break;
          case "jiekuan":
            this.getjiekuans(row);
            break;
          case "shoukuan":
            this.handleDelete(row);
            break;
  
          case "kesu":
            this.addkesu(row);
            break;
          case "kesuwanjie":
            this.chukesu(row);
          default:
            break;
        }
      },
  
      laoshijiekuanjji(row) {
        this.laoshikong = true;
        this.jiekuantitle = "新增结款";
      },
  
      /** 新增按钮操作 */
      handleAdd() {
        this.reset();
        this.getsList();
  
        this.open = true;
        this.title = "添加";
      },
      sfs(){
            listUssder({roleId:101}).then((res)=>{
              this.rgrfghr=res.data
  
            })
      },
      /** 修改按钮操作 */
      handleUpdate(row) {
        this.sfs()
        this.reset();
        this.getsList();
        this.lstform = row;
        this.open = true;
        this.title = "修改订单";
      },
  
      chuandi(row) {
        this.renwuloding = true;
        this.ruleForm.orderId = row.orderId;
      },
  
      wanjjie() {
        this.$refs["wanjie"].validate((valid) => {
          if (valid) {
            chulikesu(this.kesuwanfrom).then(() => {
              this.wanjiekopng = false;
              this.getList();
              this.$modal.msgSuccess("处理成功");
            });
          }
        });
      },
      addkesufrom() {
        this.$refs["kesufrom"].validate((valid) => {
          if (valid) {
            addkesus(this.kesufrom).then(() => {
              this.$modal.msgSuccess("客诉成功");
              this.kesufromkonga = false;
              this.getList();
            });
          }
        });
      },
      addrexnwu() {
        this.$refs["ruleForm"].validate((valid) => {
          if (valid) {
            addre(this.ruleForm).then(() => {
              this.renwuloding = false;
              this.getList();
            });
          }
        });
      },
      /** 提交按钮 */
      submitForm: function () {
        this.$refs["form"].validate((valid) => {
          if (valid) {
            if (this.lstform.orderId != undefined) {
              uplist(this.lstform).then((response) => {
                this.$modal.msgSuccess("修改成功");
                this.open = false;
                this.getList();
              });
            } else {
              // this.form.menuIds = this.getMenuAllCheckedKeys();
              addrenwuj(this.lstform).then((response) => {
                this.$modal.msgSuccess("新增成功");
                this.open = false;
                this.getList();
              });
            }
          }
        });
      },
      xiugaijiekuan(row) {
        this.laoshikong = true;
        this.jiekuantitle = "修改结款";
        this.jiekuanForm.remark = row.remark;
        this.jiekuanForm.orderId = row.orderId;
        this.jiekuanForm.recordId = row.recordId;
        this.jiekuanForm.paymentAmount = row.paymentAmount;
        this.jiekuanForm.collectionChannel = row.collectionChannel;
      },
      shanda(row) {
        this.jiekuanForm.orderId = row.orderId;
        deleteGetjiekuan(row.recordId).then((response) => {
          if (response.code == 200) {
            this.getlisd();
            this.$modal.msgSuccess("删除成功");
          }
        });
      },
  
      huifu(row) {
        this.$modal
          .confirm('是否确认恢复单号为"' + row.orderNumber + '"的数据项？')
          .then(function () {
            row.delFlag = 0;
            return uplist(row);
          })
          .then(() => {
            this.getList();
            this.$modal.msgSuccess("恢复成功");
          })
          .catch(() => {});
      },
      /** 删除按钮操作 */
      handleDelete(row) {
        const orderIds = row.orderId || this.ids;
  
        this.$modal
          .confirm('是否确认删除单号为"' + row.orderNumber + '"的数据项？')
          .then(function () {
            return deletelist(orderIds);
          })
          .then(() => {
            this.getList();
            this.$modal.msgSuccess("删除成功");
          })
          .catch(() => {});
      },
      /** 导出按钮操作 */
      handleExport() {
        this.download(
          "system/orderForm/export",
          {
            ...this.queryParams,
          },
          `order${new Date().getTime()}.xlsx`
        );
      },
    },
  };
  </script>
  <style lang="scss">
  .vo {
    width: 20px;
    height: 10px;
    background: #f4e914;
  }
  
  .el-table .yellow {
    background: #f4e914;
  
    &:hover {
      background-color: #f4e914 !important;
    }
  }
  
  .el-table .shenhui {
    background: rgb(218, 217, 217);
  
    &:hover {
      background-color: rgb(218, 217, 217) !important;
    }
  }
  
  .el-table .qianhui {
    background: #f0f0f0;
  
    &:hover {
      background-color: #f0f0f0 !important;
    }
  }
  
  .el-table .qianlan {
    background: #ffff00;
  
    &:hover {
      background-color: #ffff00 !important;
    }
  }
  
  .el-table .qianhuang {
    background: #f9f9ab;
  
    &:hover {
      background-color: #f9f9ab !important;
    }
  }
  
  .el-table .sqianhuang {
    &:hover {
      background-color: #f9d63d;
    }
  
    background: #f9d63d !important;
  }
  
  .el-table .qianlv {
    background: #d2feef;
  
    &:hover {
      background-color: #d2feef !important;
    }
  }
  
  .el-table .qianfen {
    background: #fbe7f9;
  
    &:hover {
      background-color: #fbe7f9 !important;
    }
  }
  
  .el-table .tou {
    background: transparent;
  }
  
  .el-table .shenhong {
    background: rgb(249, 149, 149);
  
    &:hover {
      background-color: rgb(249, 149, 149) !important;
    }
  }
  
  .el-table .qianhong {
    background: rgb(250, 207, 207);
  
    &:hover {
      background-color: rgb(250, 207, 207) !important;
    }
  }
  
  ::-webkit-scrollbar {
    z-index: 999999999999;
    width: 16px !important;
    /* 对垂直滚动条 */
    height: 16px !important;
    /* 对水平滚动条 */
  }
  
  .no-header-table .el-table__header {
    display: none;
    /* 隐藏表头 */
  }
  
  .el-table .cell {
    padding: 0;
  }
  
  .hong {
    color: red;
  }
  
  .el-table__body tr.hover-row > td.el-table__cell {
    background-color: transparent !important;
  }
  
  /* 隐藏克隆元素 */
  .sortable-ghost {
    opacity: 0.5;
    background-color: #f0f0f0;
  }
  
  .sortable-chosen {
    border: 2px solid #3498db;
    background-color: #ecf0f1;
  }
  .cell {
      
    user-select:auto
  }
  // .dfdsfsd{display: flex;
  
  // max-height: 50px;
  
  // overflow: hidden;}
  // .sdszxxcx{
  //   max-height: 500px;
  // }
  </style>
  